← 输入框|github.com|刷新
Skip to content

When using Apple Clang, --with-lto builds should not check for llvm-ar #87275

Closed

Description

@acmorrow
mannequin
BPO 43109
Nosy @ronaldoussoren, @vstinner, @ned-deily, @miss-islington, @xrisk, @acmorrow
PRs
  • bpo-43109: Use /usr/bin/ar on macOS for LTO builds #25999
  • bpo-43109: Fix --with-lto configure option on macOS #26341
  • [3.10] bpo-43109: Fix --with-lto configure option on macOS (GH-26341) #26342
  • [3.9] bpo-43109: Fix --with-lto configure option on macOS (GH-26341) #26343
  • bpo-43109: configure doc: LTO requires "ar" on macOS #26349
  • [3.10] bpo-43109: configure doc: LTO requires "ar" on macOS (GH-26349) #26350
  • 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 = 'https://github.com/ned-deily'
    closed_at = <Date 2021-05-25.10:58:37.915>
    created_at = <Date 2021-02-02.22:52:49.269>
    labels = ['OS-mac', 'build', '3.9', '3.10', '3.11', 'type-feature']
    title = 'When using Apple Clang, --with-lto builds should not check for llvm-ar'
    updated_at = <Date 2021-05-25.10:58:37.914>
    user = 'https://github.com/acmorrow'

    bugs.python.org fields:

    activity = <Date 2021-05-25.10:58:37.914>
    actor = 'vstinner'
    assignee = 'ned.deily'
    closed = True
    closed_date = <Date 2021-05-25.10:58:37.915>
    closer = 'vstinner'
    components = ['Build', 'macOS']
    creation = <Date 2021-02-02.22:52:49.269>
    creator = 'acmorrow'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 43109
    keywords = ['patch']
    message_count = 6.0
    messages = ['386174', '393334', '394291', '394292', '394323', '394324']
    nosy_count = 6.0
    nosy_names = ['ronaldoussoren', 'vstinner', 'ned.deily', 'miss-islington', 'xrisk', 'acmorrow']
    pr_nums = ['25999', '26341', '26342', '26343', '26349', '26350']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue43109'
    versions = ['Python 3.9', 'Python 3.10', 'Python 3.11']

    Activity

    1. acmorrow commented on Feb 2, 2021

      acmorrowmannequin
      MannequinAuthor

      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 Homebrew/homebrew-core#70177 for additional background.

    2. added
      3.9 (EOL)
      build
      type-feature
      on Feb 2, 2021
    3. self-assigned this
      on May 9, 2021
    4. ned-deily commented on May 9, 2021

      @ned-deily
      Member

      Thanks for the PR. I am looking at this area currently.

    5. miss-islington commented on May 25, 2021

      @miss-islington
      Contributor

      New changeset 25a9cf1 by Miss Islington (bot) in branch '3.10':
      bpo-43109: Fix --with-lto configure option on macOS (GH-26341)
      25a9cf1

    6. ned-deily commented on May 25, 2021

      @ned-deily
      Member

      New changeset 3af61a7 by Miss Islington (bot) in branch '3.9':
      bpo-43109: Fix --with-lto configure option on macOS (GH-26341) (GH-26343)
      3af61a7

    7. miss-islington commented on May 25, 2021

      @miss-islington
      Contributor

      New changeset ddc503c by Miss Islington (bot) in branch '3.10':
      bpo-43109: configure doc: LTO requires "ar" on macOS (GH-26349)
      ddc503c

    8. vstinner commented on May 25, 2021

      @vstinner
      Member

      Thanks to the bug report Andrew C. Morrow, it's now fixed.

      Commits in main:

      commit 59acfd4
      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 63f17c2 (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 ddc503c (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>
      
    9. added
      3.10 (EOL)
      3.11
      on May 25, 2021
    10. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    Labels

    3.10 (EOL)3.113.9 (EOL)OS-macbuildtype-feature

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions