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

configure --with-lto with clang should find the appropriate llvm-profdata tool #71376

Open
gpshead opened this issue Jun 2, 2016 · 1 comment
Labels
build The build process and cross-build

Comments

@gpshead
Copy link
Member

gpshead commented Jun 2, 2016

BPO 27189
Nosy @gpshead

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = None
created_at = <Date 2016-06-02.22:31:55.430>
labels = ['build']
title = 'configure --with-lto with clang should find the appropriate llvm-profdata tool'
updated_at = <Date 2016-06-02.22:31:55.430>
user = 'https://github.com/gpshead'

bugs.python.org fields:

activity = <Date 2016-06-02.22:31:55.430>
actor = 'gregory.p.smith'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['Build']
creation = <Date 2016-06-02.22:31:55.430>
creator = 'gregory.p.smith'
dependencies = []
files = []
hgrepos = []
issue_num = 27189
keywords = []
message_count = 1.0
messages = ['266976']
nosy_count = 1.0
nosy_names = ['gregory.p.smith']
pr_nums = []
priority = 'normal'
resolution = None
stage = 'needs patch'
status = 'open'
superseder = None
type = 'compile error'
url = 'https://bugs.python.org/issue27189'
versions = ['Python 2.7', 'Python 3.5', 'Python 3.6']

@gpshead
Copy link
Member Author

gpshead commented Jun 2, 2016

The --with-lto support added in bpo-25702 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.

@gpshead gpshead added build The build process and cross-build labels Jun 2, 2016
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build The build process and cross-build
Projects
None yet
Development

No branches or pull requests

1 participant