emscripten-core / emscripten-core/emscripten

lto2.test_embind_i64_val is failing

Open
#21,653 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
27.6k
Forks
3.6k
Avg merge
1d 1h
Merged PRs (30d)
105

Description

Looks like an issue with LTO combined with JS stub library:

```
/usr/local/google/home/sbc/dev/wasm/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libembind-rtti.a(bind.o): lazy definition of __getTypeName
/tmp/tmp4nrdaxqolibemscripten_js_symbols.so: exported __getTypeName due to import of _emval_as_int64
wasm-ld: error: /usr/local/google/home/sbc/dev/wasm/emscripten/cache/sysroot/lib/wasm32-emscripten/lto/libembind-rtti.a(bind.o): attempt to add bitcode file after LTO (__getTypeName)
/tmp/tmp4nrdaxqolibemscripten_js_symbols.so: exported __getTypeName due to import of _emval_as_uint64
/tmp/tmp4nrdaxqolibemscripten_js_symbols.so: exported __getTypeName due to import of _emval_take_value
em++: error: '/usr/local/google/home/sbc/dev/wasm/llvm-build/bin/wasm-ld -o test_i64_val.wasm /tmp/emscripten_temp_sc7s8kis/test_i64_val_0.o -lembind-rtti --trace-symbol=__getTypeName -L/usr/local/google/home/sbc/dev/wasm/emscripten/cache/sysroot/lib/wasm32-emscripten/lto -lGL-getprocaddr -lal -lhtml5 -lbulkmemory -lstubs -lnoexit -lc -ldlmalloc -lcompiler_rt -lc++-noexcept -lc++abi-noexcept -lsockets -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr /tmp/tmp4nrdaxqolibemscripten_js_symbols.so --strip-debug -u__cxa_atexit --export=_emscripten_stack_alloc --export=__wasm_call_ctors --export=emscripten_stack_get_current --export=_emscripten_stack_restore --export-if-defined=__start_em_asm --export-if-defined=__stop_em_asm --export-if-defined=__start_em_lib_deps --export-if-defined=__stop_em_lib_deps --export-if-defined=__start_em_js --export-if-defined=__stop_em_js --export-if-defined=main --export-if-defined=__main_argc_argv --export-table -z stack-size=65536 --no-growable-memory --initial-heap=16777216 --no-entry --table-base=1 --global-base=1024' failed (returned 1)
```

This was broken by #21639 which means were accidentally depending
on embind being included using `--whole-archive` previously.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.