-
-
Notifications
You must be signed in to change notification settings - Fork 51
/
Copy pathswift-build-embedded
executable file
·34 lines (27 loc) · 1.19 KB
/
swift-build-embedded
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
swift build --target JavaScriptKit \
--triple wasm32-unknown-none-wasm \
-Xswiftc -enable-experimental-feature -Xswiftc Embedded \
-Xswiftc -enable-experimental-feature -Xswiftc Extern \
-Xswiftc -wmo -Xswiftc -disable-cmo \
-Xswiftc -Xfrontend -Xswiftc -gnone \
-Xswiftc -Xfrontend -Xswiftc -disable-stack-protector \
-Xswiftc -cxx-interoperability-mode=default \
-Xcc -D__Embedded -Xcc -fdeclspec \
-Xlinker --export-if-defined=__main_argc_argv \
-Xswiftc -Xclang-linker -Xswiftc -mexec-model=reactor
# -Xlinker --export-if-defined=_initialize
# -Xswiftc -static-stdlib \
# --verbose
# -Xswiftc -Xclang-linker -Xswiftc -nostdlib \
#######
# swift build -c release --product ExampleApp \
# --sdk DEVELOPMENT-SNAPSHOT-2024-09-20-a-wasm32-unknown-wasi \
# --triple wasm32-unknown-none-wasm \
# -Xcc -D__Embedded \
# -Xswiftc -enable-experimental-feature -Xswiftc Embedded \
# -Xswiftc -enable-experimental-feature -Xswiftc Extern \
# -Xswiftc -wmo -Xswiftc -disable-cmo \
# -Xcc -fdeclspec \
# -Xswiftc -Xclang-linker -Xswiftc -mexec-model=reactor \
# -Xlinker --export-if-defined=__main_argc_argv \
#cp .build/release/ExampleApp.wasm ./TestPage/app.wasm