Skip to content

Commit

Permalink
Merge pull request swiftlang#73940 from kubamracek/embedded-dont-buil…
Browse files Browse the repository at this point in the history
…d-stdlib-when-cross-compiling

[embedded] Avoid building embedded stdlib when cross-compiling
  • Loading branch information
kubamracek committed May 28, 2024
2 parents 0eb2547 + 770d59c commit 53cfd44
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions utils/build-script-impl
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,15 @@ function set_build_options_for_host() {
-DCMAKE_OSX_ARCHITECTURES="${architecture}"
)

# Avoid building the embedded stdlib and other embedded libraries when cross-compiling.
# Those are already provided by the local host build, and are identical and only cause
# trouble when lipo-ing if they are produced in cross-compile builds too.
if [[ $(is_cross_tools_host "${host}") ]] ; then
swift_cmake_options+=(
-DSWIFT_SHOULD_BUILD_EMBEDDED_STDLIB:BOOL=FALSE
)
fi

lldb_cmake_options+=(
-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="${cmake_osx_deployment_target}"
-DCMAKE_OSX_SYSROOT:PATH="${cmake_os_sysroot}"
Expand Down

0 comments on commit 53cfd44

Please sign in to comment.