emscripten-core / emscripten-core/emscripten
wasm-ld: error: cannot open __llvm_runtime_variable: No such file or directory
- Dominant language
- C++
- Stars
- 27.6k
- Forks
- 3.6k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 105
Description
run `emcc -fprofile-arcs -ftest-coverage demo.cpp` not work
`error: undefined symbol: llvm_gcda_emit_arcs (referenced by top-level compiled C/C++ code)
warning: Link with `-sLLD_REPORT_UNDEFINED` to get more information on undefined symbols
warning: To disable errors for undefined symbols use `-sERROR_ON_UNDEFINED_SYMBOLS=0`
warning: _llvm_gcda_emit_arcs may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: llvm_gcda_emit_function (referenced by top-level compiled C/C++ code)
warning: _llvm_gcda_emit_function may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: llvm_gcda_end_file (referenced by top-level compiled C/C++ code)
warning: _llvm_gcda_end_file may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: llvm_gcda_start_file (referenced by top-level compiled C/C++ code)
warning: _llvm_gcda_start_file may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: llvm_gcda_summary_info (referenced by top-level compiled C/C++ code)
warning: _llvm_gcda_summary_info may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: llvm_gcov_init (referenced by top-level compiled C/C++ code)
warning: _llvm_gcov_init may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
Error: Aborting compilation due to previous errors`
so ,I found this [github.com/emscripten-core/emscripten/tree/fcoverage](https://github.com/emscripten-core/emscripten/tree/fcoverage)
I download branch fcoverage code
` ./emcc -v`
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 2.0.11
Homebrew clang version 12.0.1
Target: arm64-apple-darwin21.3.0
Thread model: posix
InstalledDir: /opt/homebrew/opt/llvm@12/bin
shared:INFO: (Emscripten: Running sanity checks)
run ` ./emcc -fprofile-instr-generate -fcoverage-mapping ~/Documents/my-script/emcc-demo/demo.cpp`
`wasm-ld: error: cannot open __llvm_runtime_variable: No such file or directory`
Contributor guide
Assessment
This issue has not been assessed yet.