Skip to content

Commit 53cfd44

Browse files
authored
Merge pull request #73940 from kubamracek/embedded-dont-build-stdlib-when-cross-compiling
[embedded] Avoid building embedded stdlib when cross-compiling
2 parents 0eb2547 + 770d59c commit 53cfd44

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

utils/build-script-impl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -792,6 +792,15 @@ function set_build_options_for_host() {
792792
-DCMAKE_OSX_ARCHITECTURES="${architecture}"
793793
)
794794

795+
# Avoid building the embedded stdlib and other embedded libraries when cross-compiling.
796+
# Those are already provided by the local host build, and are identical and only cause
797+
# trouble when lipo-ing if they are produced in cross-compile builds too.
798+
if [[ $(is_cross_tools_host "${host}") ]] ; then
799+
swift_cmake_options+=(
800+
-DSWIFT_SHOULD_BUILD_EMBEDDED_STDLIB:BOOL=FALSE
801+
)
802+
fi
803+
795804
lldb_cmake_options+=(
796805
-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="${cmake_osx_deployment_target}"
797806
-DCMAKE_OSX_SYSROOT:PATH="${cmake_os_sysroot}"

0 commit comments

Comments
 (0)