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

bpo-43109: Fix --with-lto configure option on macOS #26341

Merged
merged 1 commit into from May 25, 2021

Conversation

@ned-deily
Copy link
Member

@ned-deily ned-deily commented May 25, 2021

Allow --with-lto configure option to work with Apple-supplied Xcode or
Command Line Tools which do not provide llvm-ar.

https://bugs.python.org/issue43109

Allow --with-lto configure option to work with Apple-supplied Xcode or
Command Line Tools which do not provide llvm-ar.
@xrisk
Copy link
Contributor

@xrisk xrisk commented May 25, 2021

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.

@ned-deily
Copy link
Member Author

@ned-deily ned-deily commented May 25, 2021

@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
Copy link
Contributor

@xrisk xrisk commented May 25, 2021

Right, doesn’t that mean that —with-lto still wouldn’t work, unless the user also specifies CC=clang? At the very least, we should document that fact, I think never mind, sorry for the noise!

@ned-deily
Copy link
Member Author

@ned-deily ned-deily commented May 25, 2021

@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.

@ned-deily ned-deily merged commit 59acfd4 into python:main May 25, 2021
11 of 12 checks passed
11 of 12 checks passed
@github-actions
Docs
Details
@github-actions
Check for source changes
Details
@github-actions
Check if generated files are up to date
Details
@github-actions
Windows (x86)
Details
@github-actions
Windows (x64)
Details
@github-actions
macOS
Details
@github-actions
Ubuntu
Details
@github-actions
Ubuntu SSL tests with OpenSSL
Details
Azure Pipelines PR #20210525.4 failed
Details
@travis-ci
Travis CI - Pull Request Build Passed
Details
@bedevere-bot
bedevere/issue-number Issue number 43109 found
Details
@bedevere-bot
bedevere/news News entry found in Misc/NEWS.d
@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented May 25, 2021

Thanks @ned-deily for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.9.
🐍🍒🤖

miss-islington added a commit to miss-islington/cpython that referenced this pull request May 25, 2021
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>
miss-islington added a commit to miss-islington/cpython that referenced this pull request May 25, 2021
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>
@bedevere-bot
Copy link

@bedevere-bot bedevere-bot commented May 25, 2021

GH-26342 is a backport of this pull request to the 3.10 branch.

@bedevere-bot
Copy link

@bedevere-bot bedevere-bot commented May 25, 2021

GH-26343 is a backport of this pull request to the 3.9 branch.

miss-islington added a commit that referenced this pull request May 25, 2021
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>
ned-deily added a commit that referenced this pull request May 25, 2021
)

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants