Skip to content

Commit e963e0c

Browse files
authored
build-script: Check the existence of Clang+Swift compilers when using a custom toolchain (#62975)
1 parent 5a84f4c commit e963e0c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

utils/build-script-impl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1658,12 +1658,20 @@ for host in "${ALL_HOSTS[@]}"; do
16581658

16591659
if [[ "${NATIVE_CLANG_TOOLS_PATH}" ]] ; then
16601660
CLANG_BIN="${NATIVE_CLANG_TOOLS_PATH}"
1661+
if [[ ! -f "${CLANG_BIN}/clang" ]] ; then
1662+
echo "error: clang does not exist at the specified native tools path: ${CLANG_BIN}/clang"
1663+
exit 1
1664+
fi
16611665
else
16621666
CLANG_BIN="$(build_directory_bin ${LOCAL_HOST} llvm)"
16631667
fi
16641668

16651669
if [[ "${NATIVE_SWIFT_TOOLS_PATH}" ]] ; then
16661670
SWIFTC_BIN="${NATIVE_SWIFT_TOOLS_PATH}/swiftc"
1671+
if [[ ! -f "${SWIFTC_BIN}" ]] ; then
1672+
echo "error: swiftc does not exist at the specified native tools path: ${SWIFTC_BIN}"
1673+
exit 1
1674+
fi
16671675
else
16681676
SWIFTC_BIN="$(build_directory_bin ${LOCAL_HOST} swift)/swiftc"
16691677
fi

0 commit comments

Comments
 (0)