Skip to content

use the toolchain's clang when building libdispatch #2951

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 21, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion utils/build-script-impl
Original file line number Diff line number Diff line change
Expand Up @@ -2076,14 +2076,19 @@ for host in "${ALL_HOSTS[@]}"; do
libdispatch)
LIBDISPATCH_BUILD_DIR=$(build_directory ${host} ${product})
SWIFT_BUILD_PATH="$(build_directory ${host} swift)"
SWIFTC_BIN="$(build_directory_bin ${LOCAL_HOST} swift)/swiftc"
LLVM_BIN="$(build_directory_bin ${LOCAL_HOST} llvm)"

if [[ ! -f "${LIBDISPATCH_BUILD_DIR}"/config.status ]]; then
# First time building; need to run autotools and configure
call mkdir -p "${LIBDISPATCH_BUILD_DIR}"
with_pushd "${LIBDISPATCH_SOURCE_DIR}" \
call autoreconf -fvi
with_pushd "${LIBDISPATCH_BUILD_DIR}" \
call "${LIBDISPATCH_SOURCE_DIR}"/configure --prefix="$(get_host_install_destdir ${host})$(get_host_install_prefix ${host})" --with-swift-toolchain="${SWIFT_BUILD_PATH}"
call env CC="${LLVM_BIN}/clang" CCX="${LLVM_BIN}/clang" SWIFTC="${SWIFTC_BIN}" \
"${LIBDISPATCH_SOURCE_DIR}"/configure --with-swift-toolchain="${SWIFT_BUILD_PATH}" \
--prefix="$(get_host_install_destdir ${host})$(get_host_install_prefix ${host})"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is libdispatch looking for executables in SWIFT_BUILD_PATH (i.e. --with-swift-toolchain) or just the standard library? If executables, it should switch to using $(build_directory ${LOCAL_HOST} swift). I didn't know how this was used when factoring in cross-compiling support, but it seems like something we could fix here if it's not already correct. We might not be able to execute things from SWIFT_BUILD_PATH, but we should set the swift compiler's -resource-dir to $(build_directory ${host} swift)/lib/swift at any rate.


fi
with_pushd "${LIBDISPATCH_BUILD_DIR}" \
call make
Expand Down