Skip to content

llvm: fix duplicate archive member LTO conversion - #301599

Open
brendan-nasa wants to merge 1 commit into
Homebrew:mainfrom
brendan-nasa:llvm-lto-duplicate-members
Open

llvm: fix duplicate archive member LTO conversion#301599
brendan-nasa wants to merge 1 commit into
Homebrew:mainfrom
brendan-nasa:llvm-lto-duplicate-members

Conversation

@brendan-nasa

Copy link
Copy Markdown

  • Have you followed the guidelines for contributing?
  • Have you ensured that your commits follow the commit style guide?
  • Have you checked that there aren't other open pull requests for the same formula update/change?
  • Have you built your formula locally with HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>?
  • Is your test running fine brew test <formula>?
  • Does your build pass brew audit --strict <formula> (after doing HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>)? If this is a new formula, does it pass brew audit --new <formula>?

  • I did not use AI/LLM to create this PR, or I disclosed the tool/model below and reviewed its output; I did not attribute commits to AI and will answer maintainer questions and review comments myself without AI/LLM.

I drafted this PR in conversation with a combination GPT 5.6 Sol, Sonnet 5, and Opus 5. By hand, I verified the root cause, the behavior of the ruby code, compared it to the new behavior, and verified the fix worked correctly. The project that depends on libClangDriver.a also now correctly links.


Static archives can contain multiple members with the same name. Extracting them into one directory overwrites all but one, while llvm-ar r updates only the first matching member. This can leave bitcode behind and replace one translation unit with another.

Extract members separately, rebuild archives after conversion, and add regression coverage for duplicate member names.

Closes #301252.

Static archives can contain multiple members with the same name.
Extracting them into one directory overwrites all but one, while
`llvm-ar r` updates only the first matching member. This can leave
bitcode behind and replace one translation unit with another.

Extract members separately, rebuild archives after conversion, and add
regression coverage for duplicate member names.

Closes Homebrew#301252.
@github-actions github-actions Bot added the long build Set a long timeout for formula testing label Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

long build Set a long timeout for formula testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

llvm 23.1.0: LTO bitcode-to-Mach-O repair corrupts static archives with duplicate member basenames

1 participant