Skip to content

build: fix cross-compilation on Darwin platforms #32720

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 1 commit into from
Jul 7, 2020
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
19 changes: 9 additions & 10 deletions utils/build-script
Original file line number Diff line number Diff line change
Expand Up @@ -354,16 +354,15 @@ def apply_default_arguments(toolchain, args):

# Filter out any macOS stdlib deployment targets that are not supported
# by the macOS SDK.
if platform.system() == "Darwin":
targets = StdlibDeploymentTarget.get_targets_by_name(
args.stdlib_deployment_targets)
args.stdlib_deployment_targets = [
target.name
for target in targets
if (target.platform.is_darwin and
target.platform.sdk_supports_architecture(
target.arch, args.darwin_xcrun_toolchain))
]
targets = StdlibDeploymentTarget.get_targets_by_name(
args.stdlib_deployment_targets)
args.stdlib_deployment_targets = [
target.name
for target in targets
if (not target.platform.is_darwin or
target.platform.sdk_supports_architecture(
target.arch, args.darwin_xcrun_toolchain))
]

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