Skip to content

Commit ffdb85e

Browse files
committed
Unify per-platform host toolchain copy in scripts
1 parent c7557be commit ffdb85e

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

utils/webassembly/build-toolchain.sh

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,9 @@ sed -i -e "s@\".*/include@\"../../../../share/wasi-sysroot/include@g" $TMP_DIR/$
7777

7878
# Copy nightly-toolchain's host environment stdlib into toolchain
7979

80-
if [[ "$(uname)" == "Linux" ]]; then
81-
# Avoid to copy usr/lib/swift/clang because our toolchain's one is a directory
82-
# but nightly's one is symbolic link, so fail to merge them.
83-
rsync -a $NIGHTLY_TOOLCHAIN/usr/lib/ $TMP_DIR/$TOOLCHAIN_NAME/usr/lib/ --exclude 'swift/clang'
84-
else
85-
cp -r $NIGHTLY_TOOLCHAIN/usr/lib/swift/macosx $TMP_DIR/$TOOLCHAIN_NAME/usr/lib/swift
86-
fi
80+
# Avoid copying usr/lib/swift/clang because our toolchain's one is a directory
81+
# but nightly's one is symbolic link, simple copy fails to merge them.
82+
rsync -a $NIGHTLY_TOOLCHAIN/usr/lib/ $TMP_DIR/$TOOLCHAIN_NAME/usr/lib/ --exclude 'swift/clang'
8783

8884
cd $TMP_DIR
8985
tar cfz $PACKAGE_ARTIFACT $TOOLCHAIN_NAME

0 commit comments

Comments
 (0)