Skip to content

Commit 65d1271

Browse files
[WASM] Fix CoreFoundation installation script.
Move CoreFoundation dir into root swift_static Move Foundation swiftmodules into swift_static manually
1 parent b230544 commit 65d1271

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

utils/webassembly/build-foundation.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,16 @@ cmake -G Ninja \
2020

2121
ninja -v
2222
ninja -v install
23+
24+
# On macOS the target CoreFoundation shadows the CoreFoundation suppplied by Xcode.
25+
# On Linux though there's no system CoreFoundation, its headers have to be shipped
26+
# in the installable archive and serve for both host and target.
27+
if [[ "$(uname)" == "Darwin" ]]; then
28+
mv $DESTINATION_TOOLCHAIN/usr/lib/swift/CoreFoundation \
29+
$DESTINATION_TOOLCHAIN/usr/lib/swift_static/CoreFoundation
30+
31+
mv $DESTINATION_TOOLCHAIN/usr/lib/swift/wasi/wasm32/Foundation.swiftmodule \
32+
$DESTINATION_TOOLCHAIN/usr/lib/swift_static/wasi/wasm32/Foundation.swiftmodule
33+
mv $DESTINATION_TOOLCHAIN/usr/lib/swift/wasi/wasm32/Foundation.swiftdoc \
34+
$DESTINATION_TOOLCHAIN/usr/lib/swift_static/wasi/wasm32/Foundation.swiftdoc
35+
fi

0 commit comments

Comments
 (0)