Skip to content

Commit 8aef288

Browse files
committed
Disable optimization to work around a compiler bug
This disables optimization on one function to work around a Swift compiler bug in the LLVM 21 rebranch. Bug: swiftlang/llvm-project#11377
1 parent 7d824ea commit 8aef288

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Sources/SWBTaskExecution/BuildDescriptionManager.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,9 @@ package final class BuildDescriptionManager: Sendable {
175175
/// NOTE: This is primarily accessible for performance testing purposes, actual clients should prefer to access via the cached methods.
176176
///
177177
/// - Returns: A build description, or nil if cancelled.
178+
// TODO: Optimizations are disabled to work around a compiler bug. Remove this attribute when the bug is fixed.
179+
// See https://github.com/swiftlang/llvm-project/issues/11377 for details.
180+
@_optimize(none)
178181
package static func constructBuildDescription(_ plan: BuildPlan, planRequest: BuildPlanRequest, signature: BuildDescriptionSignature, inDirectory path: Path, fs: any FSProxy, bypassActualTasks: Bool = false, planningDiagnostics: [ConfiguredTarget?: [Diagnostic]], delegate: any BuildDescriptionConstructionDelegate) async throws -> BuildDescription? {
179182
BuildDescriptionManager.descriptionsComputed.increment()
180183

0 commit comments

Comments
 (0)