Skip to content

fix Clang LTO archiver selection on Apple platforms - #2761

Merged
samsinsane merged 1 commit into
premake:masterfrom
mercury233:patch-apple-clang-ar
Aug 5, 2026
Merged

fix Clang LTO archiver selection on Apple platforms#2761
samsinsane merged 1 commit into
premake:masterfrom
mercury233:patch-apple-clang-ar

Conversation

@mercury233

@mercury233 mercury233 commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Fixes Clang LTO builds on Apple platforms where Premake incorrectly selected llvm-ar, which is not provided by the default Apple toolchain. The Apple toolchain already uses LLVM, but the executable name is ar.

How does this PR change Premake's behavior?

On macOS, Premake now uses the system ar for static libraries. Other versioned toolsets, such as clang-16, retain the existing behavior. Other platforms continue to use llvm-ar when LTO is enabled.

Anything else we should know?

I just made my project build pass with LTO on, didn't test it fully.

Did you check all the boxes?

  • Focus on a single fix or feature; remove any unrelated formatting or code changes
  • Add unit tests showing fix or feature works; all tests pass
  • Mention any related issues (put closes #XXXX in comment to auto-close issue when PR is merged)
  • Follow our coding conventions
  • Minimize the number of commits
  • Align documentation to your changes

You can now support Premake on our OpenCollective. Your contributions help us spend more time responding to requests like these!

@samsinsane
samsinsane merged commit 93ff1b4 into premake:master Aug 5, 2026
83 checks passed
@mercury233
mercury233 deleted the patch-apple-clang-ar branch August 5, 2026 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants