-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[llvm-jitlink] Explicit exports for builtin runtime functions in MinGW executables #107375
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
[llvm-jitlink] Explicit exports for builtin runtime functions in MinGW executables #107375
Conversation
Background: Since MSVC limits the number of exported symbols (LNK1189) our CMake implementation silently skips auto-export: https://github.com/llvm/llvm-project/blob/release/19.x/llvm/cmake/modules/AddLLVM.cmake#L1357-L1359 Alternatively, we could follow clang-repl and use
We might be able to fix that, however, clang-repl still needs to add explicit exports for specific symbols. Usually, we really need just a few anyway, so I'd opt for the solution in this patch. Except anyone has a good reason not to? :) |
In fact, we hit the same symbol export problem in MSVC builds and we can apply the same fix. So, I am generalizing this to WIN32. |
Any objections on getting this in? |
Oh thanks for your note @vgvassilev, I thought that landed long time ago. |
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/73/builds/13037 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/201/builds/2954 Here is the relevant piece of the build log for the reference
|
…W executables (llvm#107375) Use explicit exports to fix the symbol resolution part of llvm#98714 in MinGW
@weliveindetail This bot's failure seems related to your change, can you take a look? I also suspect that your change broke building with MSVC in a non-ninja build on our internal builder. I'm trying to verify it now. |
I have now confirmed that it is this change which is causing the build to break. I can build the previous commit with no errors, but when I try to build this commit using VS2019, I get the following error:
If I try to find the file it is looking for, it is being put in an obviously wrong directory:
For reference, here is the cmake command I used:
And here is the msbuild command that I used:
I'm going to revert the change for now to unbreak the builds. |
… in MinGW executables" (#127297) Reverts #107375 This was causing a build bot failure (https://lab.llvm.org/buildbot/#/builders/201/builds/2954) and also breaks building with VS2019. See #107375 (comment) for details.
…e functions in MinGW executables" (#127297) Reverts llvm/llvm-project#107375 This was causing a build bot failure (https://lab.llvm.org/buildbot/#/builders/201/builds/2954) and also breaks building with VS2019. See llvm/llvm-project#107375 (comment) for details.
@dyung Thanks for diagnosing and reverting. The bot failures reported above they didn't seem related on first glance, but you are right, AIX must have some special exports logic already. Configuration fails with:
Maybe I find some time next week to fix that. Can you point me at a public facing bot that reproduces the MSVC issue please? |
Unfortunately I do not believe there is a build bot that builds that configuration. If you have a proposed patch, I could help you test it out. |
…W executables (llvm#107375) Use explicit exports to fix the symbol resolution part of llvm#98714 in MinGW
… in MinGW executables" (llvm#127297) Reverts llvm#107375 This was causing a build bot failure (https://lab.llvm.org/buildbot/#/builders/201/builds/2954) and also breaks building with VS2019. See llvm#107375 (comment) for details.
Use explicit exports to fix the symbol resolution part of #98714 in MinGW