Skip to content

Revert portion of workaround landed in #1139 which disabled the mandatory perf optimization pass #1172

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 25, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 2 additions & 16 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ let package = Package(
"_Testing_Foundation",
"MemorySafeTestingTests",
],
swiftSettings: .packageSettings + .disableMandatoryOptimizationsSettings
swiftSettings: .packageSettings
),

// Use a plain `.target` instead of a `.testTarget` to avoid the unnecessary
Expand Down Expand Up @@ -234,7 +234,7 @@ package.targets.append(contentsOf: [
"Testing",
"TestingMacros",
],
swiftSettings: .packageSettings + .disableMandatoryOptimizationsSettings
swiftSettings: .packageSettings
)
])
#endif
Expand Down Expand Up @@ -397,20 +397,6 @@ extension Array where Element == PackageDescription.SwiftSetting {
[]
#endif
}

/// Settings which disable Swift's mandatory optimizations pass.
///
/// This is intended only to work around a build failure caused by a Swift
/// compiler regression which is expected to be resolved in
/// [swiftlang/swift#82034](https://github.com/swiftlang/swift/pull/82034).
///
/// @Comment {
/// - Bug: This should be removed once the CI issue is resolved.
/// [swiftlang/swift-testin#1138](https://github.com/swiftlang/swift-testing/issues/1138).
/// }
static var disableMandatoryOptimizationsSettings: Self {
[.unsafeFlags(["-Xllvm", "-sil-disable-pass=mandatory-performance-optimizations"])]
}
}

extension Array where Element == PackageDescription.CXXSetting {
Expand Down