[all-commits] [llvm/llvm-project] 075581: [clang-repl] Fix undefined lld::wasm::link symbol ...

Anutosh Bhat via All-commits all-commits at lists.llvm.org
Thu Oct 24 23:09:40 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 075581f34035c01659cc883d0d69336c279ef0d5
      https://github.com/llvm/llvm-project/commit/075581f34035c01659cc883d0d69336c279ef0d5
  Author: Anutosh Bhat <87052487+anutosh491 at users.noreply.github.com>
  Date:   2024-10-25 (Fri, 25 Oct 2024)

  Changed paths:
    M clang/lib/Interpreter/CMakeLists.txt

  Log Message:
  -----------
  [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 
 https://github.com/llvm/llvm-project/blob/a4819bd46d8baebc3aaa8b38f78065de33593199/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.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list