@@ -35,10 +35,15 @@ BUNDLE_IDENTIFIER="swiftwasm.5.3-${YEAR}${MONTH}${DAY}"
35
35
DISPLAY_NAME_SHORT=" Swift for WebAssembly 5.3 Snapshot"
36
36
DISPLAY_NAME=" ${DISPLAY_NAME_SHORT} ${YEAR} -${MONTH} -${DAY} "
37
37
38
+ # Just a hack, spent enough time investigating this,
39
+ # but somehow `master` is able to work without this `mkdir`.
40
+ mkdir -p $SOURCE_PATH /install/$TOOLCHAIN_NAME /usr/lib/clang/10.0.0
38
41
$BUILD_SCRIPT \
39
42
--install_destdir=" $SOURCE_PATH /install" \
40
43
--installable_package=" $INSTALLABLE_PACKAGE " \
41
44
--install-prefix=/$TOOLCHAIN_NAME /usr \
45
+ --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" \
46
+ --llvm-install-components " clang" \
42
47
--install-swift \
43
48
--darwin-toolchain-bundle-identifier=" ${BUNDLE_IDENTIFIER} " \
44
49
--darwin-toolchain-display-name=" ${DISPLAY_NAME} " \
@@ -61,7 +66,7 @@ cd $TMP_DIR/$TOOLCHAIN_NAME
61
66
62
67
# Merge wasi-sdk and toolchain
63
68
cp -r $WASI_SDK_PATH /lib/clang usr/lib
64
- cp $WASI_SDK_PATH /bin/* usr/bin
69
+ cp -a $WASI_SDK_PATH /bin/* ld usr/bin
65
70
cp -r $WASI_SDK_PATH /share/wasi-sysroot usr/share
66
71
67
72
# Build SwiftPM and install it into toolchain
@@ -73,7 +78,9 @@ sed -i -e "s@\".*/include@\"../../../../share/wasi-sysroot/include@g" $TMP_DIR/$
73
78
# Copy nightly-toolchain's host environment stdlib into toolchain
74
79
75
80
if [[ " $( uname) " == " Linux" ]]; then
76
- cp -r $NIGHTLY_TOOLCHAIN /usr/lib/swift/linux $TMP_DIR /$TOOLCHAIN_NAME /usr/lib/swift
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'
77
84
else
78
85
cp -r $NIGHTLY_TOOLCHAIN /usr/lib/swift/macosx $TMP_DIR /$TOOLCHAIN_NAME /usr/lib/swift
79
86
fi
0 commit comments