Skip to content

Commit ff501c8

Browse files
committed
Use toolchain clang on macOS
Don't use the just-built clang on macOS. macOS does this more "right" than the Linux build. Linux will sometimes use the just-built Swift-driver with the just-built clang, but sometimes would use the system clang instead. macOS uses the toolchain Swift-driver with the toolchain clang. This is correct, but it means that if we force the other clang, we'll get mismatched sanitizer runtimes so the ASAN bot will fail.
1 parent 4e4e570 commit ff501c8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

utils/build-script-impl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1663,7 +1663,7 @@ for host in "${ALL_HOSTS[@]}"; do
16631663
CLANG_BIN="$(build_directory_bin ${LOCAL_HOST} llvm)"
16641664
fi
16651665

1666-
if [[ -f "${CLANG_BIN}/clang" ]]; then
1666+
if [[ -f "${CLANG_BIN}/clang" ]] && [[ "${host}" != "macosx-"* ]]; then
16671667
export SWIFT_DRIVER_CLANG_EXEC="${CLANG_BIN}/clang"
16681668
export SWIFT_DRIVER_CLANGXX_EXEC="${CLANG_BIN}/clang++"
16691669
fi
@@ -2735,7 +2735,7 @@ for host in "${ALL_HOSTS[@]}"; do
27352735
CLANG_BIN="$(build_directory_bin ${LOCAL_HOST} llvm)"
27362736
fi
27372737

2738-
if [[ -f "${CLANG_BIN}/clang" ]]; then
2738+
if [[ -f "${CLANG_BIN}/clang" ]] && [[ "${host}" != "macosx-"* ]]; then
27392739
export SWIFT_DRIVER_CLANG_EXEC="${CLANG_BIN}/clang"
27402740
export SWIFT_DRIVER_CLANGXX_EXEC="${CLANG_BIN}/clang++"
27412741
fi
@@ -3098,7 +3098,7 @@ for host in "${ALL_HOSTS[@]}"; do
30983098
CLANG_BIN="$(build_directory_bin ${LOCAL_HOST} llvm)"
30993099
fi
31003100

3101-
if [[ -f "${CLANG_BIN}/clang" ]]; then
3101+
if [[ -f "${CLANG_BIN}/clang" ]] && [[ "${host}" != "macosx-"* ]]; then
31023102
export SWIFT_DRIVER_CLANG_EXEC="${CLANG_BIN}/clang"
31033103
export SWIFT_DRIVER_CLANGXX_EXEC="${CLANG_BIN}/clang++"
31043104
fi

0 commit comments

Comments
 (0)