File tree 6 files changed +20
-6
lines changed
6 files changed +20
-6
lines changed Original file line number Diff line number Diff line change 1
1
# /bin/bash
2
2
3
+ export sourcedir=$PWD /..
4
+
3
5
./utils/build-script --release --wasm --verbose \
4
6
--skip-build-benchmarks \
5
7
--extra-cmake-options=" \
Original file line number Diff line number Diff line change 1
1
# /bin/bash
2
2
3
+ export sourcedir=$PWD /..
4
+
3
5
./utils/build-script --release --wasm --verbose \
4
6
--skip-build-benchmarks \
5
7
--extra-cmake-options=" \
22
24
--wasm-icu-i18n-include " $sourcedir /icu_out/include" \
23
25
--wasm-icu-uc " $sourcedir /icu_out/lib" \
24
26
--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
22
22
sudo ln -sf /opt/cmake/bin/* /usr/local/bin
23
23
cmake --version
24
24
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
26
26
tar 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
28
29
29
30
wget -O icu.tar.xz " https://github.com/swiftwasm/icu4c-wasi/releases/download/20190421.3/icu4c-wasi.tar.xz"
30
31
tar 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`
6
6
git checkout $current_sha
7
7
export sourcedir=$PWD /..
8
8
cd $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
10
10
tar 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
12
13
# Link sysroot/usr/include to sysroot/include because Darwin sysroot doesn't
13
14
# find header files in sysroot/include but sysroot/usr/include
14
15
mkdir wasi-sdk/share/sysroot/usr/
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ import MSVCRT
20
20
#endif
21
21
22
22
public 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)
24
24
preconditionFailure ( " mkstemps doesn't work on your platform " )
25
25
#else
26
26
var utf8CStr = template. utf8CString
Original file line number Diff line number Diff line change @@ -353,12 +353,14 @@ module SwiftGlibc [system] {
353
353
header "${GLIBC_INCLUDE_PATH}/libgen.h"
354
354
export *
355
355
}
356
+ % if CMAKE_SDK != "WASM":
356
357
module net {
357
358
module if {
358
359
header "${GLIBC_INCLUDE_PATH}/net/if.h"
359
360
export *
360
361
}
361
362
}
363
+ % end
362
364
module netinet {
363
365
module in {
364
366
header "${GLIBC_INCLUDE_PATH}/netinet/in.h"
@@ -517,10 +519,12 @@ module SwiftGlibc [system] {
517
519
export *
518
520
}
519
521
% end
522
+ % if CMAKE_SDK != "WASM":
520
523
module termios {
521
524
header "${GLIBC_INCLUDE_PATH}/termios.h"
522
525
export *
523
526
}
527
+ % end
524
528
module unistd {
525
529
header "${GLIBC_INCLUDE_PATH}/unistd.h"
526
530
export *
You can’t perform that action at this time.
0 commit comments