bpo-43109: Fix --with-lto configure option on macOS #26341
Conversation
Allow --with-lto configure option to work with Apple-supplied Xcode or Command Line Tools which do not provide llvm-ar.
Hi Ned, were you able to take a look at bpo-44093? In my testing, this code path never gets hit because the configure script always detects gcc on macOS. |
@xrisk, the way this has worked for many years is that you need to specifically add CC=clang to the ./configure arguments if you want to explicitly call clang. OTOH, in this case, I believe it doesn't matter as you end up with the same LTO options on macOS whether you explicitly set CC=clang or you default to the Apple-supplied gcc wrapper. |
|
@xrisk No problem and thanks for your feedback. I don't claim to have a lot of experience with LTO and friends but it looks to me like the --with-lto option produces the same result in both cases. But I could be wrong. In any case, I would prefer to put off further housecleaning in configure et al until we get 3.10 out the door. |
59acfd4
into
python:main
Thanks @ned-deily for the PR |
Allow --with-lto configure option to work with Apple-supplied Xcode or Command Line Tools which do not provide llvm-ar. (cherry picked from commit 59acfd4) Co-authored-by: Ned Deily <nad@python.org>
Allow --with-lto configure option to work with Apple-supplied Xcode or Command Line Tools which do not provide llvm-ar. (cherry picked from commit 59acfd4) Co-authored-by: Ned Deily <nad@python.org>
GH-26342 is a backport of this pull request to the 3.10 branch. |
GH-26343 is a backport of this pull request to the 3.9 branch. |
Allow
--with-lto
configure option to work with Apple-supplied Xcode orCommand Line Tools which do not provide
llvm-ar
.https://bugs.python.org/issue43109