From b0b4503c9ac57461b7d2f65cfccd66f4e851923f Mon Sep 17 00:00:00 2001 From: Stuart Montgomery Date: Tue, 24 Jun 2025 22:01:04 -0500 Subject: [PATCH 1/2] Revert "Work around macOS build failures affecting test targets (#1139)" This reverts commit 603a568c376066365e573e5a6aa043c651c7edc8. --- Package.swift | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/Package.swift b/Package.swift index 4360aabdc..0ca97f618 100644 --- a/Package.swift +++ b/Package.swift @@ -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 @@ -234,7 +234,7 @@ package.targets.append(contentsOf: [ "Testing", "TestingMacros", ], - swiftSettings: .packageSettings + .disableMandatoryOptimizationsSettings + swiftSettings: .packageSettings ) ]) #endif @@ -305,10 +305,7 @@ extension Array where Element == PackageDescription.SwiftSetting { // This setting is enabled in the package, but not in the toolchain build // (via CMake). Enabling it is dependent on acceptance of the @section // proposal via Swift Evolution. - // - // FIXME: Re-enable this once a CI blocker is resolved: - // https://github.com/swiftlang/swift-testing/issues/1138. -// .enableExperimentalFeature("SymbolLinkageMarkers"), + .enableExperimentalFeature("SymbolLinkageMarkers"), // This setting is no longer needed when building with a 6.2 or later // toolchain now that SE-0458 has been accepted and implemented, but it is @@ -397,20 +394,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 { From 7a438f6be1f00daa235a2360ce63deda8e959026 Mon Sep 17 00:00:00 2001 From: Stuart Montgomery Date: Wed, 25 Jun 2025 11:30:29 -0500 Subject: [PATCH 2/2] Keep SymbolLinkageMarkers experimental feature disabled for now, since there appears to be some new regression in compile-time constant detection --- Package.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index 0ca97f618..031968574 100644 --- a/Package.swift +++ b/Package.swift @@ -305,7 +305,10 @@ extension Array where Element == PackageDescription.SwiftSetting { // This setting is enabled in the package, but not in the toolchain build // (via CMake). Enabling it is dependent on acceptance of the @section // proposal via Swift Evolution. - .enableExperimentalFeature("SymbolLinkageMarkers"), + // + // FIXME: Re-enable this once a CI blocker is resolved: + // https://github.com/swiftlang/swift-testing/issues/1138. +// .enableExperimentalFeature("SymbolLinkageMarkers"), // This setting is no longer needed when building with a 6.2 or later // toolchain now that SE-0458 has been accepted and implemented, but it is