This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: configure --with-lto with clang should find the appropriate llvm-profdata tool
Type: compile error Stage: needs patch
Components: Build Versions: Python 3.6, Python 3.5, Python 2.7
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: gregory.p.smith
Priority: normal Keywords:

Created on 2016-06-02 22:31 by gregory.p.smith, last changed 2022-04-11 14:58 by admin.

Messages (1)
msg266976 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2016-06-02 22:31
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.
Date User Action Args
2022-04-11 14:58:31adminsetgithub: 71376
2016-06-02 22:31:55gregory.p.smithcreate