Files
clang-p2996/clang/lib/Interpreter
Anutosh Bhat 075581f340 [clang-repl] Fix undefined lld::wasm::link symbol while building clangInterpreter for wasm (#113446)
While building llvm (clang, lld) for wasm using emscripten (recipe
hosted on emscripten-forge
https://github.com/emscripten-forge/recipes/tree/main/recipes/recipes_emscripten/llvm)
I ended up with this error
```
 │ │ wasm-ld: error: ../../../../lib/libclangInterpreter.a(Wasm.cpp.o): undefined symbol: lld::wasm::link(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm:
 │ │ :raw_ostream&, bool, bool)
 ```
 This is due to the link function here 
 a4819bd46d/clang/lib/Interpreter/Wasm.cpp (L25-L30)
 
 This was added through this PR (https://github.com/llvm/llvm-project/pull/86402) as an attempt to support running clang-repl and executing C++ code interactively inside a Javascript engine using WebAssembly when built with Emscripten.
 
 The definition for link is present in lldwasm and when building for the emscripten platform we should be linking against it.
2024-10-25 09:09:14 +03:00
..