Skip to content

Commit 50ec5f6

Browse files
[WASM] Always install CoreFoundation headers in target dir
This avoids to conflict between static and shared module.map of CoreFoundation. The shared version of Foundation module.map doesn't require linking CoreFoundation, but build-foundation overwrite the shared version with static version.
1 parent a74f7b2 commit 50ec5f6

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

utils/webassembly/build-foundation.sh

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,9 @@ cmake -G Ninja \
2424
ninja -v
2525
ninja -v install
2626

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

3830
# .swiftdoc and .swiftmodule files should live in `swift`, not in `swift_static`
3931
mv $DESTINATION_TOOLCHAIN/usr/lib/swift_static/wasi/wasm32/Foundation.swift* \
40-
$DESTINATION_TOOLCHAIN/usr/lib/swift/wasi/wasm32
32+
$DESTINATION_TOOLCHAIN/usr/lib/swift/wasi/wasm32

0 commit comments

Comments
 (0)