Skip to content

Commit d1ba8e0

Browse files
committed
use the toolchain's clang when building libdispatch
Use the clang that is part of the toolchain being built when building libdispatch to ensure getting the appropriate version of clang. Also pass through SWIFTC_BIN to the configure command to prepare for a cleanup of the libdispatch side of the build process.
1 parent cbafe06 commit d1ba8e0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

utils/build-script-impl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2076,14 +2076,19 @@ for host in "${ALL_HOSTS[@]}"; do
20762076
libdispatch)
20772077
LIBDISPATCH_BUILD_DIR=$(build_directory ${host} ${product})
20782078
SWIFT_BUILD_PATH="$(build_directory ${host} swift)"
2079+
SWIFTC_BIN="$(build_directory_bin ${LOCAL_HOST} swift)/swiftc"
2080+
LLVM_BIN="$(build_directory_bin ${LOCAL_HOST} llvm)"
20792081

20802082
if [[ ! -f "${LIBDISPATCH_BUILD_DIR}"/config.status ]]; then
20812083
# First time building; need to run autotools and configure
20822084
call mkdir -p "${LIBDISPATCH_BUILD_DIR}"
20832085
with_pushd "${LIBDISPATCH_SOURCE_DIR}" \
20842086
call autoreconf -fvi
20852087
with_pushd "${LIBDISPATCH_BUILD_DIR}" \
2086-
call "${LIBDISPATCH_SOURCE_DIR}"/configure --prefix="$(get_host_install_destdir ${host})$(get_host_install_prefix ${host})" --with-swift-toolchain="${SWIFT_BUILD_PATH}"
2088+
call env CC="${LLVM_BIN}/clang" CCX="${LLVM_BIN}/clang" SWIFTC="${SWIFTC_BIN}" \
2089+
"${LIBDISPATCH_SOURCE_DIR}"/configure --with-swift-toolchain="${SWIFT_BUILD_PATH}" \
2090+
--prefix="$(get_host_install_destdir ${host})$(get_host_install_prefix ${host})"
2091+
20872092
fi
20882093
with_pushd "${LIBDISPATCH_BUILD_DIR}" \
20892094
call make

0 commit comments

Comments
 (0)