-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
Doubts regarding compiling llvm (clang, lld) to wasm #114223
Comments
I am not sure what
The cmake functions/macros used in the file you linked are defined in Perhaps you could make your setup work as a native build first and then try wasm again? To see if the problem is the commands that cmake is generating. |
Okay maybe I can provide some more context
So when you see something like this
The emar and emranlib instructions are stored there. I am maintaining the llvm recipe for emscripten-forge (a place that hosts recipes built against emscripten ) and the above logs are from there
Now I have this segment in the CMakeLists.txt
I just can't understand why the linking between clangCppInterOp and clangInterpreter isn't happening properly (leading to undefined symbols). Now I see similar steps being encountered while building llvm (clang, lld) against emscripten too .... but as I mentioned above I don't think there are any errors and |
I see this
llvm-project/clang/lib/Interpreter/CMakeLists.txt
Lines 1 to 48 in e8b95a0
Well this generates the following link.txt
Here I can see the source file object being used .
But i am not able to understand the linking between
clangInterpreter
and the other link_libs (likeclangAST
) and components (like for egSupport
). Where and How does this take place ?I am working on a very similar structure where there are
So I need to compile my project (let's say libXX.a) .
I am using the similar mechanism as above (only
add_llvm_library
instead ofadd_clang_library
)So when I build xx against emscripten, I end up getting lot of undefined symbols (which are supposed to be provided by the static libraries like libclangInterpreter.a) .... which tells me that the linking against the static libraries and components is not taking place as expected.
Hence if I understand how the above works I shall try to replicate it for my usecase too
The text was updated successfully, but these errors were encountered: