Skip to content
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

[3.6] bpo-28015: Support LTO build with clang (GH-9908) #10922

Merged
merged 1 commit into from Dec 9, 2018

Conversation

@stratakis
Copy link
Contributor

stratakis commented Dec 5, 2018

.o generated by clang in LTO mode actually are LLVM bitcode files, which
leads to a few errors during configure/build step:

  • add lto flags to the BASECFLAGS instead of CFLAGS, as CFLAGS are used
    to build autoconf test case, and some are not compatible with clang LTO
    (they assume binary in the .o, not bitcode)
  • force llvm-ar instead of ar, as ar is not aware of .o files generated
    by clang -flto
    (cherry picked from commit 5ad36f9)

Co-authored-by: serge-sans-paille serge.guelton@telecom-bretagne.eu

https://bugs.python.org/issue28015

.o generated by clang in LTO mode actually are LLVM bitcode files, which
leads to a few errors during configure/build step:

- add lto flags to the BASECFLAGS instead of CFLAGS, as CFLAGS are used
  to build autoconf test case, and some are not compatible with clang LTO
  (they assume binary in the .o, not bitcode)
- force llvm-ar instead of ar, as ar is not aware of .o files generated
  by clang -flto
(cherry picked from commit 5ad36f9)

Co-authored-by: serge-sans-paille <serge.guelton@telecom-bretagne.eu>
@ned-deily ned-deily merged commit f83ee47 into python:3.6 Dec 9, 2018
6 checks passed
6 checks passed
Azure Pipelines PR #20181205.24 succeeded
Details
bedevere/issue-number Issue number 28015 found
Details
bedevere/maintenance-branch-pr Valid maintenance branch PR title.
bedevere/news News entry found in Misc/NEWS.d
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@stratakis stratakis deleted the stratakis:clang_lto branch Dec 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.