diff --git a/platform/amd64/custom_imports.c b/platform/amd64/custom_imports.c index baaeb16..da3cc00 100644 --- a/platform/amd64/custom_imports.c +++ b/platform/amd64/custom_imports.c @@ -24,3 +24,7 @@ U32 testmodule__input_data(void *i, U32 k) { U32 testmodule__input_data_len() { return test_input_data_len; } + +void testmodule__shutdown() { + printf("shutdown()\n"); +} diff --git a/platform/amd64/scripts/c2native-amd64.sh b/platform/amd64/scripts/c2native-amd64.sh index c294f2d..f5f1dba 100755 --- a/platform/amd64/scripts/c2native-amd64.sh +++ b/platform/amd64/scripts/c2native-amd64.sh @@ -79,6 +79,7 @@ CFLAGS=( -g -DAMD64 -D__bool_true_false_are_defined + -include stdbool.h -O0 ) @@ -95,13 +96,14 @@ SOURCES=( platform/amd64/amd64.c platform/amd64/custom_imports.c "$GUEST_DIR/guest.c" + $GUEST_DIR/s0*.c w2c2/embedded/wasi.c ) # Link libraries LIBS=(-lm) -"$DOCKER_DIR/docker-shell.sh" gcc \ +clang \ "${CFLAGS[@]}" \ "${INCLUDES[@]}" \ "${SOURCES[@]}" \