-
Notifications
You must be signed in to change notification settings - Fork 12.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
Update Python and Clang on x86 dist images #81489
Conversation
LLVM 12 no longer builds with Python 2, so install Python 3 in preparatin. However, Clang 10 does not build with Python 3, so we need update to Clang 11 as well, which supports both. Unfortunately, doing so results in errors while linking the libLLVM.so into other binaries: > __morestack: invalid needed version 2 This is fixed by using LLD instead. Possibly this is due to a binutils linker bug, but updating to the latest binutils version does not fix it.
I think the changes here shouldn't impact end users at all. We should make sure that LLVM will still build fine without lld/super-recent clang with more modern toolchains (e.g., on Ubuntu 20.04 LTS with roughly just build-essential), but I presume that's checked upstream to some extent too. r=me if I'm correct about the above. |
FWIW, there was also a case of the |
Yeah, so the linker problem here isn't related to LLVM 12, it also occurs with LLVM 11 and is somehow related to use of Clang 11 and the BFD linker (and possibly some environment factors -- who knows with this old distro) to compile libLLVM.so and then link it. LLVM 12 itself does build fine (and link into rustc) on Ubuntu 20.04 with a standard toolchain, as that's the system I'm on. |
@bors r+ rollup=never |
📌 Commit e066dea has been approved by |
This avoids a conflict if llvm.thin-lto=true is combined with an explicit llvm.use-linker=lld.
I've switched the Missed this previously as I did not delete |
@bors r+ |
📌 Commit a84ff2b has been approved by |
⌛ Testing commit a84ff2b with merge 800ff69df656ec8d4a240efe8fe8c7589424393c... |
💥 Test timed out |
@bors retry |
☀️ Test successful - checks-actions |
Looks like this PR broke the produced toolchains: #81489 |
LLVM 12 no longer builds with Python 2, so install Python 3 in
preparation for the upgrade (#81451).
However, Clang 10 does not build with Python 3, so we need update
to Clang 11 as well, which supports both.
Unfortunately, doing so results in errors while linking the
libLLVM.so into other binaries:
This is fixed by using LLD instead. Possibly this is due to a binutils
linker bug, but updating to the latest binutils version does not fix
it.
r? @Mark-Simulacrum
cc @cuviper