HomeAleph Objects Inc

bpo-28015: Support LTO build with clang (GH-9908)

Authored by serge-sans-paille <serge.guelton@telecom-bretagne.eu> on Oct 24 2018, 5:54 PM.

Description

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

Event Timeline

Victor Stinner <vstinner@redhat.com> committed rCP5ad36f9b21a3: bpo-28015: Support LTO build with clang (GH-9908) (authored by serge-sans-paille <serge.guelton@telecom-bretagne.eu>).Oct 24 2018, 5:54 PM