Skip to content

Commit 2ef95d3

Browse files
committed
[Apple Silicon] Fix cross-compilation in Xcode trains where we're not building stdlib at all
1 parent 05028a2 commit 2ef95d3

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

utils/build-script-impl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,6 +1056,10 @@ function host_has_darwin_symbols() {
10561056
}
10571057

10581058
function get_stdlib_targets_for_host() {
1059+
# Don't build the stdlib in the Xcode train for host and cross-compilations host.
1060+
if [[ "${STDLIB_DEPLOYMENT_TARGETS[@]}" == "" ]]; then
1061+
return 0
1062+
fi
10591063

10601064
# FIXME: STDLIB_DEPLOYMENT_TARGETS argument assumed to apply when Host == Build
10611065
# Cross-compile Hosts are only built with their native standard libraries.

utils/swift_build_support/swift_build_support/host_specific_configuration.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ def __init__(self, host_target, args):
4141
stdlib_targets_to_configure = [host_target]
4242
stdlib_targets_to_build = set(stdlib_targets_to_configure)
4343

44+
if args.stdlib_deployment_targets == []:
45+
stdlib_targets_to_configure = []
46+
stdlib_targets_to_build = []
47+
4448
# Compute derived information from the arguments.
4549
#
4650
# FIXME: We should move the platform-derived arguments to be entirely

0 commit comments

Comments
 (0)