-
-
Notifications
You must be signed in to change notification settings - Fork 267
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
Posix: Move magic DSO registration code to rt.dso druntime module #3850
Conversation
Very nice @kinke |
8c2f6da
to
4e64712
Compare
I can't reproduce the MSan failures
from the single failing LLVM 9 GH Actions job, with |
Could it be fixed by changing link order ? |
a21bbcf
to
a9ab693
Compare
Doesn't look like it, putting it as first object file in the linker cmdline hasn't changed anything. Some more tests have shown that those 2 MSan tests on Ubuntu 18.04 fail with shared default libs - at least with LLVM 8 & 9 for GH Actions; LLVM 11 & 12 work with the same image (and shared libs). So I guess this has to do with the MSan version. Further tests in #3858 with lld and bfd linkers show that this does seem to fix #3786, the LTO lit-tests with lld v12.0.1 now succeed. There's apparently one regression with bfd though, |
On Linux, all 3 linkers are CI-tested now:
|
This also fixes a general issue with LLD v13 - with current master, a hello-world fails to link (but works with LLD v10, and according to CI, with v12 too):
Not sure why it works with this, but it does. |
Instead, use the object file generated by compiling shared druntime directly. By using the `@hidden` UDA in that module, `-fvisibility=public` isn't a problem anymore. We also end up with a 32-bit `ldc_rt.dso.o` for MULTILIB=ON this way.
This should help on Windows if those tools aren't available/in PATH.
Mainly, avoid running the MSan lit-tests with shared default libs, which apparently regressed with the rt.dso introduction with older LLVM/MSan versions - for GH Actions, at least with LLVM v8 and v9; v11 and v12 do work.
…ault linker" This reverts commit 1d11882.
Addressing #3786.