xref: /aosp_15_r20/external/swiftshader/third_party/subzero/c2wasm-exe.sh (revision 03ce13f70fcc45d86ee91b7ee4cab1936a95046e)
1*03ce13f7SAndroid Build Coastguard Worker#!/bin/bash
2*03ce13f7SAndroid Build Coastguard Worker
3*03ce13f7SAndroid Build Coastguard Worker# TODO (eholk): This script is a hack for debugging and development
4*03ce13f7SAndroid Build Coastguard Worker# that should be removed.
5*03ce13f7SAndroid Build Coastguard Worker
6*03ce13f7SAndroid Build Coastguard Worker./wasm-install/bin/emscripten/emcc "$1" -s BINARYEN=1 \
7*03ce13f7SAndroid Build Coastguard Worker  -s 'BINARYEN_METHOD="native-wasm"' \
8*03ce13f7SAndroid Build Coastguard Worker  --em-config wasm-install/emscripten_config_vanilla -O2 && \
9*03ce13f7SAndroid Build Coastguard Worker./wasm-install/bin/sexpr-wasm a.out.wast -o a.out.wasm && \
10*03ce13f7SAndroid Build Coastguard Worker./pnacl-sz a.out.wasm -o a.out.o -filetype=obj -O2 && \
11*03ce13f7SAndroid Build Coastguard Workerclang -m32 a.out.o ./runtime/szrt.c \
12*03ce13f7SAndroid Build Coastguard Worker  ./runtime/wasm-runtime.cpp -lm -g -lstdc++
13