forked from envoyproxy/envoy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: convert test for a missing import from WAT to WASM format. (env…
…oyproxy#59) This is needed, since not all runtimes support WAT format. Signed-off-by: Piotr Sikora <[email protected]>
- Loading branch information
1 parent
ea56a23
commit a7687ea
Showing
5 changed files
with
7,251 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,13 @@ | ||
NO_CONTEXT = true | ||
|
||
all: logging_cpp.wasm logging_rust.wasm bad_signature_cpp.wasm segv_cpp.wasm emscripten_cpp.wasm asm2wasm_cpp.wasm stats_cpp.wasm | ||
all: logging_cpp.wasm logging_rust.wasm bad_signature_cpp.wasm segv_cpp.wasm emscripten_cpp.wasm asm2wasm_cpp.wasm stats_cpp.wasm missing_cpp.wasm | ||
|
||
include ../../../../api/wasm/cpp/Makefile.base_lite | ||
include ../../../../api/wasm/rust/Makefile.base | ||
|
||
missing_cpp.wasm missing_cpp.wat: missing_cpp.cc ${CPP_API}/proxy_wasm_intrinsics.h ${CPP_API}/proxy_wasm_intrinsics.js | ||
em++ -s WASM=1 -s ERROR_ON_UNDEFINED_SYMBOLS=0 -s LEGALIZE_JS_FFI=0 -s EMIT_EMSCRIPTEN_METADATA=1 --std=c++17 -O3 -g3 -DEMSCRIPTEN_PROTOBUF_LITE=1 -I${CPP_API} -I${CPP_API}/google/protobuf -I/usr/local/include --js-library ${CPP_API}/proxy_wasm_intrinsics.js missing_cpp.cc ${CPP_API}/proxy_wasm_intrinsics_lite.pb.cc ${CPP_API}/struct_lite.pb.cc ${CPP_CONTEXT_LIB} ${CPP_API}/libprotobuf-lite.bc -o missing_cpp.js | ||
wavm-disas missing_cpp.wasm missing_cpp.wat | ||
wavm-compile missing_cpp.wasm missing_cpp.wasm | ||
rm -f missing_cpp.js missing_cpp.wast | ||
chmod 644 missing_cpp.wat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// NOLINT(namespace-envoy) | ||
#include "proxy_wasm_intrinsics.h" | ||
|
||
extern "C" void missing(); | ||
|
||
extern "C" EMSCRIPTEN_KEEPALIVE void proxy_onStart() { missing(); } |
Binary file not shown.
Oops, something went wrong.