From 571e8a6f8e58754a3371dd3a722bfe77d4913ca7 Mon Sep 17 00:00:00 2001 From: Martin Fouilleul Date: Sun, 25 Jun 2023 20:18:14 +0200 Subject: [PATCH] Explicitly mark symbols imported from the runtime and avoid --allow-undefined (get compile-time errors on non-runtime-provided undefined symbols) --- milepost | 2 +- samples/pong/build.sh | 1 - scripts/bindgen2.py | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/milepost b/milepost index 28e0a6c..bc03887 160000 --- a/milepost +++ b/milepost @@ -1 +1 @@ -Subproject commit 28e0a6c88e3fb272d376d458a875300bb1531e23 +Subproject commit bc0388714821eea6dd8a4e72bc24f2a899e9123f diff --git a/samples/pong/build.sh b/samples/pong/build.sh index a1d1233..c843563 100755 --- a/samples/pong/build.sh +++ b/samples/pong/build.sh @@ -5,7 +5,6 @@ wasmFlags="--target=wasm32 \ -fno-builtin \ -Wl,--no-entry \ -Wl,--export-dynamic \ - -Wl,--allow-undefined \ -g \ -D__ORCA__ \ -I ../../src -I ../../sdk -I../../milepost/ext -I ../../milepost -I ../../milepost/src -I ../../milepost/src/util -I ../../milepost/src/platform -I../.." diff --git a/scripts/bindgen2.py b/scripts/bindgen2.py index bc5bbe1..ea956a7 100644 --- a/scripts/bindgen2.py +++ b/scripts/bindgen2.py @@ -57,7 +57,7 @@ for decl in data: else: s += decl['ret']['name'] - s += ' ' + argPtrStubName + '(' + s += ' ORCA_IMPORT(' + argPtrStubName + ') (' if decl['ret']['tag'] == 'S': s += decl['ret']['name'] + '* __retArg'