Provide minimal C/C++ std library to wasm external scanners
This commit is contained in:
parent
7dc81303f6
commit
98ccfcffb0
5 changed files with 2344 additions and 75 deletions
17
script/build-wasm-stdlib
Executable file
17
script/build-wasm-stdlib
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
emcc \
|
||||
-o stdlib.wasm \
|
||||
-Os \
|
||||
--no-entry \
|
||||
-s MAIN_MODULE=2 \
|
||||
-s 'EXPORTED_FUNCTIONS=@lib/src/wasm/stdlib-symbols.json' \
|
||||
-fvisibility=hidden \
|
||||
-fno-exceptions \
|
||||
-xc \
|
||||
/dev/null
|
||||
|
||||
xxd -C -i stdlib.wasm > lib/src/wasm/wasm-stdlib.h
|
||||
mv stdlib.wasm target/
|
||||
Loading…
Add table
Add a link
Reference in a new issue