-
Notifications
You must be signed in to change notification settings - Fork 13.3k
release/19.x: [clang-repl] Fix undefined lld::wasm::link symbol while building clangInterpreter for wasm (#113446) #115848
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@vgvassilev What do you think about merging this PR to the release branch? |
@llvm/pr-subscribers-clang Author: None (llvmbot) ChangesBackport 075581f Requested by: @aheejin Full diff: https://github.com/llvm/llvm-project/pull/115848.diff 1 Files Affected:
diff --git a/clang/lib/Interpreter/CMakeLists.txt b/clang/lib/Interpreter/CMakeLists.txt
index 6a069659ebb8db..0a2d60757c216d 100644
--- a/clang/lib/Interpreter/CMakeLists.txt
+++ b/clang/lib/Interpreter/CMakeLists.txt
@@ -14,6 +14,7 @@ set(LLVM_LINK_COMPONENTS
if (EMSCRIPTEN AND "lld" IN_LIST LLVM_ENABLE_PROJECTS)
set(WASM_SRC Wasm.cpp)
+ set(WASM_LINK lldWasm)
endif()
add_clang_library(clangInterpreter
@@ -43,6 +44,7 @@ add_clang_library(clangInterpreter
clangParse
clangSema
clangSerialization
+ ${WASM_LINK}
)
if ((MINGW OR CYGWIN) AND BUILD_SHARED_LIBS)
|
|
cc @anutosh491 |
Yupp made the change. Have never seen such a message before and I wasn't even sure as to why my mail was private (changed it to public now). Is something more expected from my side ? I am guessing we can try closing and opening this PR if something in CI fails due to that ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, the risk of breaking binary compatibility and user base is very low.
I think one of the checks has been queued since quite some time but isn't running. |
Hi @aheejin The checks pass as expected. I guess this should be ready ! |
As I said I'm not a release maintainer. I don't have permission to merge commits to release branches. |
Ahh okay, in that case I am guessing @tru might be able to help us out. |
…gInterpreter for wasm (llvm#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 (llvm#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. (cherry picked from commit 075581f)
@aheejin (or anyone else). If you would like to add a note about this fix in the release notes (completely optional). Please reply to this comment with a one or two sentence description of the fix. When you are done, please add the release:note label to this PR. |
Backport 075581f
Requested by: @aheejin