Skip to content

Commit b309c62

Browse files
authored
[build] set CMAKE_OSX_ARCHITECTURES in swift_cmake_options (#31414)
This augments #31023 to make sure CMake invokes the compiler checks correctly -- this is needed to avoid errors in certain configurations. Addresses rdar://62339814
1 parent 89a3d66 commit b309c62

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

utils/build-script-impl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -621,6 +621,9 @@ function set_build_options_for_host() {
621621
-DSWIFT_DARWIN_DEPLOYMENT_VERSION_TVOS="${DARWIN_DEPLOYMENT_VERSION_TVOS}"
622622
-DSWIFT_DARWIN_DEPLOYMENT_VERSION_WATCHOS="${DARWIN_DEPLOYMENT_VERSION_WATCHOS}"
623623
-DCMAKE_OSX_SYSROOT:PATH="${cmake_os_sysroot}"
624+
# This is needed to make sure to avoid using the wrong architecture
625+
# in the compiler checks CMake performs
626+
-DCMAKE_OSX_ARCHITECTURES="${architecture}"
624627
)
625628
;;
626629
esac

0 commit comments

Comments
 (0)