Uh oh!
There was an error while loading. Please reload this page.
rustllvm: Use .init_array rather than .ctors - #71234
Conversation
rust-highfive
commented
Apr 17, 2020
r? @cuviper (rust_highfive has picked a reviewer for you, use r? to override) |
cuviper
commented
Apr 17, 2020
We've been talking about compatibility on #71233 -- let's get a real CI build that I can actually test on an old @bors try You also mentioned the possibility of a |
bors
commented
Apr 17, 2020
⌛ Trying commit 1d84563f375a5977ffa8eb640aa80a84959b4bf1 with merge b87bd037d8b09eee9115142adb1d61112cb4865c... |
bors
commented
Apr 17, 2020
⌛ Trying commit 1d84563f375a5977ffa8eb640aa80a84959b4bf1 with merge ab42f00561856008c3af29d224b26c802e4563d2... |
cuviper
commented
Apr 17, 2020
Sorry about that -- I didn't see bors responding, and now I got it twice... oh well. |
Dylan-DPC-zz
commented
Apr 17, 2020
@bors try |
bors
commented
Apr 17, 2020
⌛ Trying commit 1d84563f375a5977ffa8eb640aa80a84959b4bf1 with merge 04ec1be6a7a65dd0304d2b35993ae7daf7abbc13... |
maurer
commented
Apr 17, 2020
I added in |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
maurer
commented
Apr 19, 2020
I've made the requested changes. |
bors
commented
Apr 22, 2020
☔ The latest upstream changes (presumably #71374) made this pull request unmergeable. Please resolve the merge conflicts. |
nnethercote
commented
Apr 23, 2020
When you rebase over #71374 please make sure you preserve the new alphabetical order. Also, it looks like you haven't updated the tests, please see the new comment at the top of |
maurer
commented
Apr 29, 2020
I've rebased the patch and added the test entry nnethercote asked for. |
Uh oh!
There was an error while loading. Please reload this page.
LLVM TargetMachines default to using the (now-legacy) .ctors representation of init functions. Mixing .ctors and .init_array representations can cause issues when linking with lld. This happens in practice for: * Our profiling runtime which is currently implicitly built with .init_array since it is built by clang, which sets this field. * External C/C++ code that may be linked into the same process. To support legacy systems which may use .ctors, targets may now specify that they use .ctors via the use_ctors attribute which defaults to false. For debugging and manual control, -Z use-ctors-section=yes/no will allow manual override. Fixes: rust-lang#71233
cuviper
commented
May 5, 2020
The patch looks OK, but I'd like a second opinion on making this change -- maybe @joshtriplett? |
joshtriplett
commented
May 7, 2020
This seems reasonable to me; we should certainly use |
cuviper
commented
May 9, 2020
@bors r+ |
bors
commented
May 9, 2020
📌 Commit 0e7d5be has been approved by |
Rollup of 5 pull requests Successful merges: - rust-lang#69406 (upgrade chalk and use chalk-solve/chalk-ir/chalk-rust-ir) - rust-lang#71185 (Move tests from `test/run-fail` to UI) - rust-lang#71234 (rustllvm: Use .init_array rather than .ctors) - rust-lang#71508 (Simplify the `tcx.alloc_map` API) - rust-lang#71555 (Remove ast::{Ident, Name} reexports.) Failed merges: r? @ghost
LLVM TargetMachines default to using the (now-legacy) .ctors
representation of init functions. Mixing .ctors and .init_array
representations can cause issues when linking with lld.
This happens in practice for:
.init_array since it is built by clang, which sets this field.
Fixes: #71233