Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions Sources/SWBApplePlatform/Specs/iOSSimulator.xcspec
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
Identifier = x86_64;
PerArchBuildSettingName = "Intel 64-bit";
SortNumber = 106;
DeploymentTargetRange = ( "0", "27" );
},

{
Expand Down
1 change: 1 addition & 0 deletions Sources/SWBApplePlatform/Specs/tvOSSimulator.xcspec
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
Identifier = x86_64;
PerArchBuildSettingName = "Intel 64-bit";
SortNumber = 106;
DeploymentTargetRange = ( "0", "27" );
},


Expand Down
1 change: 1 addition & 0 deletions Sources/SWBApplePlatform/Specs/watchOSSimulator.xcspec
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
Identifier = x86_64;
PerArchBuildSettingName = "Intel 64-bit";
SortNumber = 106;
DeploymentTargetRange = ( "0", "27" );
},

{
Expand Down
1 change: 1 addition & 0 deletions Sources/SWBApplePlatform/Specs/xrOSSimulator.xcspec
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
Identifier = x86_64;
PerArchBuildSettingName = "Intel 64-bit";
SortNumber = 106;
DeploymentTargetRange = ( "0", "27" );
},

{
Expand Down
19 changes: 19 additions & 0 deletions Tests/SWBCoreTests/SettingsTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4961,6 +4961,25 @@ import SWBTestSupport
}
}

@Test(.requireSDKs(.iOS), .requireXcode27())
func activeRunDestination_Simulator_x86_64ClampedAtDefaultDeploymentTarget() async throws {
// Build all standard archs. The clamp then drops x86_64 from a simulator build at the
// default (>= 27) deployment target.
try await testActiveRunDestinationiOS(extraBuildSettings: [
"ONLY_ACTIVE_ARCH": "NO",
], runDestination: .iOSSimulator) { context, settings, scope throws in
#expect(settings.errors == [])
#expect(settings.warnings == [])
#expect(scope.evaluate(BuiltinMacros.PLATFORM_NAME) == "iphonesimulator")
#expect(scope.evaluate(BuiltinMacros.PLATFORM_FAMILY_NAME) == "iOS")
#expect(scope.evaluate(BuiltinMacros.SDKROOT) == context.sdkRegistry.lookup("iphonesimulator")?.path)
#expect(!scope.evaluate(BuiltinMacros.ONLY_ACTIVE_ARCH))
#expect(scope.evaluate(BuiltinMacros.ARCHS) == ["arm64"])
try #require(scope.evaluate(try scope.namespace.declareStringMacro("x86_64")) == "")
try #require(scope.evaluate(try scope.namespace.declareStringMacro("arm64")) == "YES")
}
}

@Test(.requireSDKs(.macOS), .requireXcode26())
func activeRunDestination_ONLY_ACTIVE_ARCH_interaction() async throws {
// Prefer the run destination's targetArchitecture
Expand Down
Loading