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
Windows build failure with -DLLVM_EXPORT_SYMBOLS_FOR_PLUGINS: too many symbols exported #60109
Comments
What's your build command? Maybe you can try to use Visual studio to open the |
I don't see what difference using VS would make, considering the creation of the .symbols/.def files roots in LLVM's CMakeLists.txt files. The full cmake command line (off our CI) looks like this: The only thing that I expect to be making a difference is |
I managed to fix the clang-repl failure by adding some filtering in extract_symbols.py (for __real@* and __xmm@* symbols, which are constants that presumably plugins would pick from headers), but that failure still happens on clang itself, except when building with clang itself, and the main difference there is that clang and cl are not exporting the same (trivial) functions that are defined in headers (because they don't inline the same set). Ironically, these are symbols plugins would not really need (because they would either inline from the headers or end up defining it themselves), but I don't think they could be distinguished in the output from dumpbin or llvm-readobj. |
This strips out about 5k symbols. Fixes llvm/llvm-project#60109 Reviewed By: john.brawn Differential Revision: https://reviews.llvm.org/D142431
…iewers,andi,ahochheiden This requires a couple backports from clang trunk: - one for llvm/llvm-project#60109 - one to replace revert-llvmorg-15-init-17171-g8bb4451a651a.patch, which addresses the regression rather than reverting it. clang_include_cleaner.patch is also disabled in clang-tidy, as the patch doesn't apply anymore, and the check it adds is not enabled by default. Differential Revision: https://phabricator.services.mozilla.com/D173106
Issue #56109 is back.
It's worth noting that the link.exe error is almost inscrutable (
LINK : fatal error LNK1189: library limit of 65535 objects exceeded
), while the llvm-link.exe error is more useful (lld-link: error: too many exported symbols (got 66002, max 65535)
)Random observation: there are 3k+ symbols
__xmm@something
that are exported, and I'm not sure they need to be.The number is also different between cross and native compiles (66002 vs. 66119)
It's also worth noting that clang.def is approaching the limit too, with 64420 lines.
The clang-repl.def from my cross build can be found here: https://gist.githubusercontent.com/glandium/79352c2fb0cc63589a3b308a0b25b0f6/raw/0f2e4586baade767df4f0f4c68a2e7c63522ca7d/clang-repl.def
The text was updated successfully, but these errors were encountered: