Skip to content

Commit 9a99563

Browse files
[WASM] Resolve build failure by fixing cross compile issue on build-script
The added lines by Apple Silicon patch really depend on the build machine platform and it forces that we can build stdlib only for darwin targets. So I changed to allow non-darwin targets and filter only unsupported darwin targets. This patch shuold be sent to upstream.
1 parent c1b336b commit 9a99563

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
@@ -360,16 +360,15 @@ def apply_default_arguments(toolchain, args):
360360

361361
# Filter out any macOS stdlib deployment targets that are not supported
362362
# by the macOS SDK.
363-
if platform.system() == "Darwin":
364-
targets = StdlibDeploymentTarget.get_targets_by_name(
365-
args.stdlib_deployment_targets)
366-
args.stdlib_deployment_targets = [
367-
target.name
368-
for target in targets
369-
if (target.platform.is_darwin and
370-
target.platform.sdk_supports_architecture(
371-
target.arch, args.darwin_xcrun_toolchain))
372-
]
363+
targets = StdlibDeploymentTarget.get_targets_by_name(
364+
args.stdlib_deployment_targets)
365+
args.stdlib_deployment_targets = [
366+
target.name
367+
for target in targets
368+
if (not target.platform.is_darwin or
369+
target.platform.sdk_supports_architecture(
370+
target.arch, args.darwin_xcrun_toolchain))
371+
]
373372

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

0 commit comments

Comments
 (0)