Skip to content

Commit ad26860

Browse files
authored
Copy all libraries from the nightly toolchain, including IndexStore
`libIndexStore` is needed to enable `swift test --enable-test-discovery`, which uses it even when cross-compiling.
1 parent 4bb1458 commit ad26860

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
@@ -72,13 +72,9 @@ sed -i -e "s@\".*/include@\"../../../../share/wasi-sysroot/include@g" $TMP_DIR/$
7272

7373
# Copy nightly-toolchain's host environment stdlib into toolchain
7474

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

8379
$UTILS_PATH/build-foundation.sh $TMP_DIR/$TOOLCHAIN_NAME
8480
$UTILS_PATH/build-xctest.sh $TMP_DIR/$TOOLCHAIN_NAME

0 commit comments

Comments
 (0)