-
-
Notifications
You must be signed in to change notification settings - Fork 30.6k
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
Add support for building cpython with clang thin lto #88506
Comments
The existing --with-lto argument could be extended to pass through a value to select non-default lto compiler options: CC=clang ./configure --with-lto=thin This would allow default behavior to remain unchanged, while allowing those that want to use thin lto to opt in. For what it's worth, the tests (make test) pass using clang 11.1.0 and thinlto. |
I am now building the experiment environment to compare between thin-lto and full-lto |
FYI, Thin LTO shows enhanced build time. Full LTO (./configure --with-lto=full CC=clang) Thin LTO (./configure --with-lto=thin CC=clang) |
The test is executed under the following environments. MS Azure: D8s v3 [corona10@PythonLinux cpython]$ ./python -m pyperformance compare full.json thin.json Performance version: 1.0.2 thin.json Performance version: 1.0.2 ### 2to3 ### ### chameleon ### ### chaos ### ### crypto_pyaes ### ### deltablue ### ### django_template ### ### dulwich_log ### ### fannkuch ### ### float ### ### go ### ### hexiom ### ### json_dumps ### ### json_loads ### ### logging_format ### ### logging_silent ### ### logging_simple ### ### mako ### ### meteor_contest ### ### nbody ### ### nqueens ### ### pathlib ### ### pickle ### ### pickle_dict ### ### pickle_list ### ### pickle_pure_python ### ### pidigits ### ### pyflate ### ### python_startup ### ### python_startup_no_site ### ### raytrace ### ### regex_compile ### ### regex_dna ### ### regex_effbot ### ### regex_v8 ### ### richards ### ### scimark_fft ### ### scimark_lu ### ### scimark_monte_carlo ### ### scimark_sor ### ### scimark_sparse_mat_mult ### ### spectral_norm ### ### sqlalchemy_declarative ### ### sqlalchemy_imperative ### ### sqlite_synth ### ### sympy_expand ### ### sympy_integrate ### ### sympy_str ### ### sympy_sum ### ### telco ### ### tornado_http ### ### unpack_sequence ### ### unpickle ### ### unpickle_list ### ### unpickle_pure_python ### ### xml_etree_generate ### ### xml_etree_iterparse ### ### xml_etree_parse ### ### xml_etree_process ### |
clang version 11.0.0 |
Now CPython 3.11 supports the Thin LTO, And also thank you Pablo and Gregory for the reviews! |
@ned.deily Can we use the thin-lto option for next macOS Python distribution? cpython/Mac/BuildScript/build-installer.py Line 1199 in 366fcba
FYI, Gentoo already recommends using the thin LTO instead of the full LTO. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: