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.7] bpo-28015: Support LTO build with clang (GH-9908) #10089

Merged
merged 1 commit into from Oct 25, 2018

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Oct 25, 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>
Copy link
Member

@vstinner vstinner left a comment

LGTM.

@miss-islington
Copy link
Contributor Author

miss-islington commented Oct 25, 2018

@serge-sans-paille and @vstinner: Status check is done, and it's a success .

@miss-islington miss-islington merged commit 69a3f15 into python:3.7 Oct 25, 2018
@miss-islington miss-islington deleted the backport-5ad36f9-3.7 branch Oct 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants