classification
Title: When using Apple Clang, --with-lto builds should not check for llvm-ar
Type: enhancement Stage: resolved
Components: Build, macOS Versions: Python 3.11, Python 3.10, Python 3.9
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: ned.deily Nosy List: acmorrow, miss-islington, ned.deily, ronaldoussoren, vstinner, xrisk
Priority: normal Keywords: patch

Created on 2021-02-02 22:52 by acmorrow, last changed 2021-05-25 10:58 by vstinner. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 25999 closed xrisk, 2021-05-09 00:09
PR 26341 merged ned.deily, 2021-05-25 01:59
PR 26342 merged miss-islington, 2021-05-25 03:00
PR 26343 merged miss-islington, 2021-05-25 03:00
PR 26349 merged vstinner, 2021-05-25 09:49
PR 26350 merged miss-islington, 2021-05-25 10:25
Messages (6)
msg386174 - (view) Author: Andrew C. Morrow (acmorrow) Date: 2021-02-02 22:52
When building with `--with-lto`, an explicit check for `llvm-ar` is performed as part of the configure step. However, Apple does not ship `llvm-ar` as part of Xcode, so when building with Apple Clang this check fails and prevents using `--with-lto`.

However, using the builtin `ar` seems to work just fine, and it can be selected by passing `LLVM_AR=/path/to/ar` to `configure`. It would be nice to see the `configure` script updated to know that system `ar` is sufficient when using Apple Clang on macOS.

Please see https://github.com/Homebrew/homebrew-core/pull/70177 for additional background.
msg393334 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2021-05-09 19:16
Thanks for the PR. I am looking at this area currently.
msg394291 - (view) Author: miss-islington (miss-islington) Date: 2021-05-25 04:19
New changeset 25a9cf197ea0d77abd49992a7751efa0046bb1e6 by Miss Islington (bot) in branch '3.10':
bpo-43109: Fix --with-lto configure option on macOS (GH-26341)
https://github.com/python/cpython/commit/25a9cf197ea0d77abd49992a7751efa0046bb1e6
msg394292 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2021-05-25 04:21
New changeset 3af61a7176a68bfeb349eeed314b9c3d7ebc3ad5 by Miss Islington (bot) in branch '3.9':
bpo-43109: Fix --with-lto configure option on macOS (GH-26341) (GH-26343)
https://github.com/python/cpython/commit/3af61a7176a68bfeb349eeed314b9c3d7ebc3ad5
msg394323 - (view) Author: miss-islington (miss-islington) Date: 2021-05-25 10:56
New changeset ddc503c8d20c4893e69b5bf466ad85da6a3f0be6 by Miss Islington (bot) in branch '3.10':
bpo-43109: configure doc: LTO requires "ar" on macOS (GH-26349)
https://github.com/python/cpython/commit/ddc503c8d20c4893e69b5bf466ad85da6a3f0be6
msg394324 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-05-25 10:58
Thanks to the bug report Andrew C. Morrow, it's now fixed.

Commits in main:

commit 59acfd4a09df1c141dac7845eed008af8970fce7
Author: Ned Deily <nad@python.org>
Date:   Mon May 24 23:00:04 2021 -0400

    bpo-43109: Fix --with-lto configure option on macOS (GH-26341)
    
    Allow --with-lto configure option to work with Apple-supplied Xcode or
    Command Line Tools which do not provide llvm-ar.

commit 63f17c252ab1b9357c5f022296213c42d9629458 (HEAD -> main, upstream/main)
Author: Victor Stinner <vstinner@python.org>
Date:   Tue May 25 12:25:22 2021 +0200

    bpo-43109: configure doc: LTO requires "ar" on macOS (GH-26349)


Commits in 3.10 branch:

commit ddc503c8d20c4893e69b5bf466ad85da6a3f0be6 (upstream/3.10, 3.10)
Author: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Date:   Tue May 25 03:56:37 2021 -0700

    bpo-43109: configure doc: LTO requires "ar" on macOS (GH-26349)
    
    (cherry picked from commit 63f17c252ab1b9357c5f022296213c42d9629458)
    
    Co-authored-by: Victor Stinner <vstinner@python.org>
History
Date User Action Args
2021-05-25 10:58:37vstinnersetstatus: open -> closed
stage: patch review -> resolved
resolution: fixed
versions: + Python 3.10, Python 3.11
2021-05-25 10:58:29vstinnersetmessages: + msg394324
2021-05-25 10:56:56miss-islingtonsetmessages: + msg394323
2021-05-25 10:25:32miss-islingtonsetpull_requests: + pull_request24940
2021-05-25 09:49:33vstinnersetpull_requests: + pull_request24939
2021-05-25 04:21:35ned.deilysetmessages: + msg394292
2021-05-25 04:19:03miss-islingtonsetmessages: + msg394291
2021-05-25 03:00:23miss-islingtonsetpull_requests: + pull_request24935
2021-05-25 03:00:18miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request24934
2021-05-25 01:59:24ned.deilysetpull_requests: + pull_request24931
2021-05-09 19:16:58ned.deilysetmessages: + msg393334
2021-05-09 19:15:26ned.deilysetassignee: ned.deily

components: + macOS
nosy: + ronaldoussoren, ned.deily
2021-05-09 00:09:56xrisksetkeywords: + patch
nosy: + xrisk

pull_requests: + pull_request24652
stage: patch review
2021-02-02 23:54:50vstinnersetnosy: + vstinner
2021-02-02 22:52:49acmorrowcreate