File tree Expand file tree Collapse file tree 6 files changed +20
-6
lines changed Expand file tree Collapse file tree 6 files changed +20
-6
lines changed Original file line number Diff line number Diff line change 11# /bin/bash
22
3+ export sourcedir=$PWD /..
4+
35./utils/build-script --release --wasm --verbose \
46 --skip-build-benchmarks \
57 --extra-cmake-options=" \
Original file line number Diff line number Diff line change 11# /bin/bash
22
3+ export sourcedir=$PWD /..
4+
35./utils/build-script --release --wasm --verbose \
46 --skip-build-benchmarks \
57 --extra-cmake-options=" \
2224 --wasm-icu-i18n-include " $sourcedir /icu_out/include" \
2325 --wasm-icu-uc " $sourcedir /icu_out/lib" \
2426 --wasm-icu-uc-include " $sourcedir /icu_out/include" \
25- --wasm-wasi-sdk " $sourcedir /wasi-sdk"
27+ --wasm-wasi-sdk " $sourcedir /wasi-sdk" \
28+ --install-swift \
29+ --install-prefix=" /opt/swiftwasm-sdk" \
30+ --install-destdir=" $sourcedir /install" \
31+ --installable-package=" $sourcedir /swiftwasm-mac.tar.gz"
Original file line number Diff line number Diff line change @@ -22,9 +22,10 @@ sudo ./install_cmake.sh --skip-license --prefix=/opt/cmake
2222sudo ln -sf /opt/cmake/bin/* /usr/local/bin
2323cmake --version
2424
25- wget -O wasi-sdk.tar.gz https://github.com/swiftwasm/wasi-sdk/releases/download/20190421.6 /wasi-sdk-3.19gefb17cb478f9.m -linux.tar.gz
25+ wget -O wasi-sdk.tar.gz https://github.com/swiftwasm/wasi-sdk/releases/download/20191022.1 /wasi-sdk-4.39g3025a5f47c04 -linux.tar.gz
2626tar xfz wasi-sdk.tar.gz
27- mv wasi-sdk-3.19gefb17cb478f9+m/opt/wasi-sdk ./wasi-sdk
27+ mv wasi-sdk-4.39g3025a5f47c04 ./wasi-sdk
28+ mv wasi-sdk/share/wasi-sysroot wasi-sdk/share/sysroot
2829
2930wget -O icu.tar.xz " https://github.com/swiftwasm/icu4c-wasi/releases/download/20190421.3/icu4c-wasi.tar.xz"
3031tar xf icu.tar.xz
Original file line number Diff line number Diff line change @@ -6,9 +6,10 @@ export current_sha=`git rev-parse HEAD`
66git checkout $current_sha
77export sourcedir=$PWD /..
88cd $sourcedir
9- wget -O wasi-sdk.tar.gz https://github.com/swiftwasm/wasi-sdk/releases/download/20190421.6 /wasi-sdk-3.19gefb17cb478f9.m -linux.tar.gz
9+ wget -O wasi-sdk.tar.gz https://github.com/swiftwasm/wasi-sdk/releases/download/20191022.1 /wasi-sdk-4.39g3025a5f47c04 -linux.tar.gz
1010tar xfz wasi-sdk.tar.gz
11- mv wasi-sdk-3.19gefb17cb478f9+m/opt/wasi-sdk ./wasi-sdk
11+ mv wasi-sdk-4.39g3025a5f47c04 ./wasi-sdk
12+ mv wasi-sdk/share/wasi-sysroot wasi-sdk/share/sysroot
1213# Link sysroot/usr/include to sysroot/include because Darwin sysroot doesn't
1314# find header files in sysroot/include but sysroot/usr/include
1415mkdir wasi-sdk/share/sysroot/usr/
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ import MSVCRT
2020#endif
2121
2222public func _stdlib_mkstemps( _ template: inout String , _ suffixlen: CInt ) -> CInt {
23- #if os(Android) || os(Haiku) || os(Windows)
23+ #if os(Android) || os(Haiku) || os(Windows) || os(Wasm)
2424 preconditionFailure ( " mkstemps doesn't work on your platform " )
2525#else
2626 var utf8CStr = template. utf8CString
Original file line number Diff line number Diff line change @@ -353,12 +353,14 @@ module SwiftGlibc [system] {
353353 header "${GLIBC_INCLUDE_PATH}/libgen.h"
354354 export *
355355 }
356+ % if CMAKE_SDK != "WASM":
356357 module net {
357358 module if {
358359 header "${GLIBC_INCLUDE_PATH}/net/if.h"
359360 export *
360361 }
361362 }
363+ % end
362364 module netinet {
363365 module in {
364366 header "${GLIBC_INCLUDE_PATH}/netinet/in.h"
@@ -517,10 +519,12 @@ module SwiftGlibc [system] {
517519 export *
518520 }
519521% end
522+ % if CMAKE_SDK != "WASM":
520523 module termios {
521524 header "${GLIBC_INCLUDE_PATH}/termios.h"
522525 export *
523526 }
527+ % end
524528 module unistd {
525529 header "${GLIBC_INCLUDE_PATH}/unistd.h"
526530 export *
You can’t perform that action at this time.
0 commit comments