Skip to content

Commit f446c25

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 4e4d547 commit f446c25

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
@@ -1666,7 +1666,7 @@ for host in "${ALL_HOSTS[@]}"; do
16661666
CLANG_BIN="$(build_directory_bin ${LOCAL_HOST} llvm)"
16671667
fi
16681668

1669-
if [[ -f "${CLANG_BIN}/clang" ]]; then
1669+
if [[ -f "${CLANG_BIN}/clang" ]] && [[ -z ${ENABLE_ASAN+x} ]]; then
16701670
export SWIFT_DRIVER_CLANG_EXEC="${CLANG_BIN}/clang"
16711671
export SWIFT_DRIVER_CLANGXX_EXEC="${CLANG_BIN}/clang++"
16721672
fi
@@ -2744,7 +2744,7 @@ for host in "${ALL_HOSTS[@]}"; do
27442744
CLANG_BIN="$(build_directory_bin ${LOCAL_HOST} llvm)"
27452745
fi
27462746

2747-
if [[ -f "${CLANG_BIN}/clang" ]]; then
2747+
if [[ -f "${CLANG_BIN}/clang" ]] && [[ -z ${ENABLE_ASAN+x} ]]; then
27482748
export SWIFT_DRIVER_CLANG_EXEC="${CLANG_BIN}/clang"
27492749
export SWIFT_DRIVER_CLANGXX_EXEC="${CLANG_BIN}/clang++"
27502750
fi
@@ -3039,7 +3039,7 @@ for host in "${ALL_HOSTS[@]}"; do
30393039
CLANG_BIN="$(build_directory_bin ${LOCAL_HOST} llvm)"
30403040
fi
30413041

3042-
if [[ -f "${CLANG_BIN}/clang" ]]; then
3042+
if [[ -f "${CLANG_BIN}/clang" ]] && [[ -z ${ENABLE_ASAN+x} ]]; then
30433043
export SWIFT_DRIVER_CLANG_EXEC="${CLANG_BIN}/clang"
30443044
export SWIFT_DRIVER_CLANGXX_EXEC="${CLANG_BIN}/clang++"
30453045
fi

0 commit comments

Comments
 (0)