The --with-lto support added in issue25702 can work with clang, but on a Linux distribution such as ubuntu 16.04 with clang installed you get:
$ CC=clang ./configure --with-lto
...
$ make profile-opt
Error: Cannot perform PGO build because llvm-profdata was not found in PATH
Please add it to PATH and run ./configure again
Makefile:503: recipe for target 'profile-opt' failed
make: *** [profile-opt] Error 1
The llvm-profdata tool exists but is only known as llvm-profdata-3.8. We should have the ./configure script figure this out. I'm not sure what the preferred "right" way to determine this is. Detecting that CC is a clang compiler and using its reported version number? noticing that clang is a symlink into an llvm-X.Y tree and using that number? none of these sound great. hopefully there is a better deterministic way to query clang for this.
|