-
-
Notifications
You must be signed in to change notification settings - Fork 31.5k
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
Link-time-optimization with clang is broken #96761
Comments
@corona10 Thanks! That seems to be mostly about speeding up the GCC build. LLVM is already pretty fast with thin-lto. |
I will try to reproduce the issue in my Linux environment with clang14 before reviewing the PR. |
Okay, I am able to reproduce the issue even with the lld. |
Thanks for confirming that it's not just some idiosyncratic weirdness of my environment. |
For @matthiasgoergens, @tiran @vstinner cc @pablogsal as release manager. My conclusion
Referencefile formatcorona10@python-dev:~/cpython$ file Modules/getbuildinfo.o
Modules/getbuildinfo.o: LLVM IR bitcode clang full LTO processclang ThinLTO process |
Why is this only affecting 3.11 and not previous version? |
because #29859 was first introduced in Python 3.11 for |
When building the final binary for CPython, we actually pass the |
Manual transformation example:
|
Thanks for the quick answer and great analysis @corona10. I think the fix for this should go to 3.11.1 as this likely involve configure changes unless someone fundamentally disagrees. |
As far as I can tell, building Thin LTO is pretty fast, and compatible with the other LTO settings (apart perhaps from no-LTO), so we can build the bootstrap with that one, if any LTO is requested for the main build? |
Please follow my last review: #96762 (comment) |
@corona10 Yes, definitely. I need to add checks. |
…p_python Co-authored-by: Matthias Goergens <matthias.goergens@gmail.com>
…on (gh-96945) Co-authored-by: Matthias Goergens <matthias.goergens@gmail.com>
…p_python (pythongh-96945) Co-authored-by: Matthias Goergens <matthias.goergens@gmail.com> (cherry picked from commit 83d84e6) Co-authored-by: Dong-hee Na <donghee.na@python.org>
All patches are merged. |
I tried to enable link time optimizations for clang.
Eventually building reaches this step:
And fails:
Your environment
I'm on Archlinux x86-64.
I tested against main.
The text was updated successfully, but these errors were encountered: