-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Remove support for older LLVM versions, and re-order linker flags #105110
Conversation
We have generally tried to support linking multiple versions of LLVM within our git tree. Every new LLVM version moves symbols around between libraries, and as a result, every new version of LLVM requires different linker flags to build. The command line tool `llvm-config` should tell you the exact flags you need, but it is a problem for us when cross-compiling to rely on this, and as a result, we transcribe the result of various llvm-config outputs directly into Mono's CMakeLists.txt. In an effort to support multiple versions of LLVM, flags common between all supported versions were kept in one place, then the version-specific flags appended afterwards. And this has worked fine for years. However: 1. Whilst we only link with `lld`, it is common for contributors and source-build to link with `gold`, `bfd`, or some other GNU-flavoured linker, where library order is essential 2. The list of common libraries to link has remained unchanged for years, but the symbol intra-dependencies may have changed a long time ago, so common symbol order cannot be assumed to remain valid between LLVM versions This has resulted in a long-standing problem for people using e.g. Debian or Ubuntu or GitHub CodeSpaces, rather than always building with one of our dockerfiles representing our "real" build environment, when targeting platforms which use Mono and link LLVM.
It looks like the linker order between We need to regenerate the full linker list in |
Let's run the other azp runs that are most likely affected. Just for peace of mind. |
/azp run runtime-wasm |
Azure Pipelines successfully started running 1 pipeline(s). |
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.
I tested building with this PR and it appears to resolve the issues I was having on Debian Bookworm with its system packages (llvm/clang 14)
Closing and opening to re-trigger the CI after the outage |
* Use ConcurrentDictionary in runtimecounters test Fixes #105443 * Fix build break
…#105530) * Fix issue 98506 - Excessive exceptions generated in StackTraceSymbols * Code review feedback
There was a problem with using heap from the related LoaderAllocator for shuffle thunk cache heap. I have tested it again and it seems that the issue is gone. So I am removing the workaround, making the cache use LoaderAllocator local heap. Close #55697
…rget path in Wasm SDK (#105458)
…-and-fix-linker-order
Okay the commit history is a mess, but I updated the linkages to LLVM 19. Ignore the branch name. |
We have generally tried to support linking multiple versions of LLVM within our git tree. Every new LLVM version moves symbols around between libraries, and as a result, every new version of LLVM requires different linker flags to build. The command line tool
llvm-config
should tell you the exact flags you need, but it is a problem for us when cross-compiling to rely on this, and as a result, we transcribe the result of various llvm-config outputs directly into Mono's CMakeLists.txt.In an effort to support multiple versions of LLVM, flags common between all supported versions were kept in one place, then the version-specific flags appended afterwards. And this has worked fine for years. However:
lld
, it is common for contributors and source-build to link withgold
,bfd
, or some other GNU-flavoured linker, where library order is essentialThis has resulted in a long-standing problem for people using e.g. Debian or Ubuntu or GitHub CodeSpaces, rather than always building with one of our dockerfiles representing our "real" build environment, when targeting platforms which use Mono and link LLVM.