]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-28015: Support LTO build with clang (GH-9908)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 25 Oct 2018 00:32:04 +0000 (17:32 -0700)
committerGitHub <noreply@github.com>
Thu, 25 Oct 2018 00:32:04 +0000 (17:32 -0700)
commit69a3f153a92fd8c86080e8da477ee50df18fc0d1
tree3f9609886fc42185cc352870408b4d289a3b20c7
parentb3223940091b1ea52b0fd856801d79e2281e5b19
bpo-28015: Support LTO build with clang (GH-9908)

.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 5ad36f9b21a3aa3b2265b1b43d73522cc3322df2)

Co-authored-by: serge-sans-paille <serge.guelton@telecom-bretagne.eu>
Misc/NEWS.d/next/Build/2018-10-16-12-22-36.bpo-28015.ylSgFh.rst [new file with mode: 0644]
aclocal.m4
configure
configure.ac