Skip to content

Commit 7016cb5

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 bdf987a commit 7016cb5

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

368368
# Filter out any macOS stdlib deployment targets that are not supported
369369
# by the macOS SDK.
370-
if platform.system() == "Darwin":
371-
targets = StdlibDeploymentTarget.get_targets_by_name(
372-
args.stdlib_deployment_targets)
373-
args.stdlib_deployment_targets = [
374-
target.name
375-
for target in targets
376-
if (target.platform.is_darwin and
377-
target.platform.sdk_supports_architecture(
378-
target.arch, args.darwin_xcrun_toolchain))
379-
]
370+
targets = StdlibDeploymentTarget.get_targets_by_name(
371+
args.stdlib_deployment_targets)
372+
args.stdlib_deployment_targets = [
373+
target.name
374+
for target in targets
375+
if (not target.platform.is_darwin or
376+
target.platform.sdk_supports_architecture(
377+
target.arch, args.darwin_xcrun_toolchain))
378+
]
380379

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

0 commit comments

Comments
 (0)