Skip to content

Copy Dispatch and Clang from upstream toolchain #719

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 7 commits into from
May 7, 2020
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
8 changes: 6 additions & 2 deletions utils/webassembly/build-toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ $BUILD_SCRIPT \
--install_destdir="$SOURCE_PATH/install" \
--installable_package="$INSTALLABLE_PACKAGE" \
--install-prefix=/$TOOLCHAIN_NAME/usr \
--swift-install-components "autolink-driver;compiler;clang-builtin-headers;stdlib;sdk-overlay;parser-lib;editor-integration;tools;testsuite-tools;toolchain-tools;license;sourcekit-inproc;swift-remote-mirror;swift-remote-mirror-headers;clang-resource-dir-symlink" \
--llvm-install-components "clang" \
--install-swift \
--darwin-toolchain-bundle-identifier="${BUNDLE_IDENTIFIER}" \
--darwin-toolchain-display-name="${DISPLAY_NAME}" \
Expand All @@ -61,7 +63,7 @@ cd $TMP_DIR/$TOOLCHAIN_NAME

# Merge wasi-sdk and toolchain
cp -r $WASI_SDK_PATH/lib/clang usr/lib
cp $WASI_SDK_PATH/bin/* usr/bin
cp -a $WASI_SDK_PATH/bin/*ld usr/bin
cp -r $WASI_SDK_PATH/share/wasi-sysroot usr/share

# Build SwiftPM and install it into toolchain
Expand All @@ -73,7 +75,9 @@ sed -i -e "s@\".*/include@\"../../../../share/wasi-sysroot/include@g" $TMP_DIR/$
# Copy nightly-toolchain's host environment stdlib into toolchain

if [[ "$(uname)" == "Linux" ]]; then
cp -r $NIGHTLY_TOOLCHAIN/usr/lib/swift/linux $TMP_DIR/$TOOLCHAIN_NAME/usr/lib/swift
# Avoid to copy usr/lib/swift/clang because our toolchain's one is a directory
# but nightly's one is symbolic link, so fail to merge them.
rsync -a $NIGHTLY_TOOLCHAIN/usr/lib/ $TMP_DIR/$TOOLCHAIN_NAME/usr/lib/ --exclude 'swift/clang'
else
cp -r $NIGHTLY_TOOLCHAIN/usr/lib/swift/macosx $TMP_DIR/$TOOLCHAIN_NAME/usr/lib/swift
fi
Expand Down