Skip to content

Commit dd51dac

Browse files
authored
Merge pull request #32720 from swiftwasm/reenable-cross-compilation
build: fix cross-compilation on Darwin platforms
2 parents 0aebb24 + 2612e9f commit dd51dac

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

utils/build-script

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -354,16 +354,15 @@ def apply_default_arguments(toolchain, args):
354354

355355
# Filter out any macOS stdlib deployment targets that are not supported
356356
# by the macOS SDK.
357-
if platform.system() == "Darwin":
358-
targets = StdlibDeploymentTarget.get_targets_by_name(
359-
args.stdlib_deployment_targets)
360-
args.stdlib_deployment_targets = [
361-
target.name
362-
for target in targets
363-
if (target.platform.is_darwin and
364-
target.platform.sdk_supports_architecture(
365-
target.arch, args.darwin_xcrun_toolchain))
366-
]
357+
targets = StdlibDeploymentTarget.get_targets_by_name(
358+
args.stdlib_deployment_targets)
359+
args.stdlib_deployment_targets = [
360+
target.name
361+
for target in targets
362+
if (not target.platform.is_darwin or
363+
target.platform.sdk_supports_architecture(
364+
target.arch, args.darwin_xcrun_toolchain))
365+
]
367366

368367
# Include the Darwin module-only architectures in the CMake options.
369368
if args.swift_darwin_module_archs:

0 commit comments

Comments
 (0)