Skip to content

Commit d4c6e2c

Browse files
authored
Allow cross-compilation on Apple Silicon (#622)
Address rdar://99486698
1 parent 64e8d21 commit d4c6e2c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Utilities/build-script-helper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def get_swiftpm_options(swift_exec: str, args: argparse.Namespace) -> List[str]:
137137

138138
build_target = get_build_target(swift_exec, args)
139139
if args.cross_compile_host:
140-
if build_target == 'x86_64-apple-macosx' and args.cross_compile_host == "macosx-arm64":
140+
if re.search('-apple-macosx', build_target) and re.match('macosx-', args.cross_compile_host):
141141
swiftpm_args += ["--arch", "x86_64", "--arch", "arm64"]
142142
elif re.match('android-', args.cross_compile_host):
143143
print('Cross-compiling for %s' % args.cross_compile_host)

0 commit comments

Comments
 (0)