Skip to content

Commit 2612e9f

Browse files
kateinoigakukunMaxDesiatov
authored andcommitted
[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 9c20198 commit 2612e9f

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)