Skip to content

Commit a36ab6e

Browse files
Support cross compilation in macOS toolchain builds (#62306)
Updates the build script used in SwiftCI for building the `docc` executable as part of Swift.org toolchains to support cross compilation. Currently the `docc` executable included in the otherwise universal macOS toolchain only supports x86_64. This resolves the issue. Resolves rdar://102870094 Closes swiftlang/swift-docc#433
1 parent e3f572d commit a36ab6e

File tree

1 file changed

+7
-0
lines changed
  • utils/swift_build_support/swift_build_support/products

1 file changed

+7
-0
lines changed

utils/swift_build_support/swift_build_support/products/swiftdocc.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,13 @@ def run_build_script_helper(self, action, host_target, additional_params=[]):
6464
'--build-dir', self.build_dir,
6565
'--multiroot-data-file', MULTIROOT_DATA_FILE_PATH,
6666
]
67+
68+
# Pass Cross compile host info
69+
if self.has_cross_compile_hosts() and self.is_darwin_host(host_target):
70+
helper_cmd += ['--cross-compile-hosts']
71+
for cross_compile_host in self.args.cross_compile_hosts:
72+
helper_cmd += [cross_compile_host]
73+
6774
if action != 'install':
6875
helper_cmd.extend([
6976
# There might have been a Package.resolved created by other builds

0 commit comments

Comments
 (0)