Skip to content

Commit

Permalink
Avoid use of -sLLD_REPORT_UNDEFINED=0
Browse files Browse the repository at this point in the history
This reverts commit e42c903.
  • Loading branch information
kleisauke committed Dec 25, 2022
1 parent 8bcb426 commit d1798d8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 0 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ export LDFLAGS="-L$TARGET/lib -O3 -sEXPORTED_FUNCTIONS=_main,_malloc,_free -sALL
if [ "$WASM_BIGINT" = "true" ]; then
export LDFLAGS+=" -sWASM_BIGINT"
fi
# Ensure the `ffi_call` symbol can be found at link time
export LDFLAGS+=" -sLLD_REPORT_UNDEFINED=0"

# Build paths
export CPATH="$TARGET/include"
Expand Down
6 changes: 5 additions & 1 deletion src/wasm32/ffi.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ unbox_small_structs, (ffi_type type_ptr), {

EM_JS_MACROS(
void,
ffi_call, (ffi_cif * cif, ffi_fp fn, void *rvalue, void **avalue),
ffi_call_helper, (ffi_cif *cif, ffi_fp fn, void *rvalue, void **avalue),
{
var abi = CIF__ABI(cif);
var nargs = CIF__NARGS(cif);
Expand Down Expand Up @@ -392,6 +392,10 @@ ffi_call, (ffi_cif * cif, ffi_fp fn, void *rvalue, void **avalue),
}
});

void ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue) {
ffi_call_helper(cif, fn, rvalue, avalue);
}

#define CLOSURE__wrapper(addr) DEREF_U32(addr, 0)
#define CLOSURE__cif(addr) DEREF_U32(addr, 1)
#define CLOSURE__fun(addr) DEREF_U32(addr, 2)
Expand Down
2 changes: 0 additions & 2 deletions testsuite/emscripten-test-stuff/node-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ export LDFLAGS="-O3 -sEXPORTED_FUNCTIONS=_main,_malloc,_free -sALLOW_TABLE_GROWT
if [ "$WASM_BIGINT" = "true" ]; then
export LDFLAGS+=" -sWASM_BIGINT"
fi
# Ensure the `ffi_call` symbol can be found at link time
export LDFLAGS+=" -sLLD_REPORT_UNDEFINED=0"

# Specific variables for cross-compilation
export CHOST="wasm32-unknown-linux" # wasm32-unknown-emscripten
Expand Down

0 comments on commit d1798d8

Please sign in to comment.