Repository navigation
fix(bench): link via ld64.lld on macOS (was always n/a) (#60) - #62
Merged
Merged
Conversation
clang maps `-fuse-ld=NAME` to `ld.NAME` (except `lld`), so the bench's bare `-fuse-ld=ld64.lld` looked for a nonexistent `ld.ld64.lld` and the macOS `ld64.lld` series was always n/a. Translate the `ld64.lld` token to the resolved absolute path of ld64.lld on PATH (matching ci.yml's proven macOS invocation), falling back to `lld` (clang selects ld64.lld for Mach-O). The table still shows `ld64.lld`; every other linker and reld's shim pass through unchanged. Applied at one point covering the probe, the synthetic path, and --replay-corpus. Closes #60 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The macOS reld-bench smoke used --linker lld, which never hit the bug in #60 (bare -fuse-ld=ld64.lld -> nonexistent ld.ld64.lld). Switch it to --linker ld64.lld and assert a real timing is produced, so the fix is proven live on the macOS runner (RED -> GREEN) rather than only by unit tests. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #60.
Problem
On macOS the benchmark recorded
ld64.lldasn/afor every scenario. clang maps-fuse-ld=NAMEto a linker namedld.NAME(GNU convention;lldis the one special case), so reld-bench's bare-fuse-ld=ld64.lldlooked for a nonexistentld.ld64.lldand the probe/link failed.ld64.lldis on PATH in the macOS job — this was purely the invocation.Fix
Translate the
ld64.lldtoken to the resolved absolute path ofld64.lldonPATH(matchingci.yml's already-proven macOS smoke, which links with-fuse-ld="$(brew --prefix llvm@18)/bin/ld64.lld"), falling back to-fuse-ld=lld(clang selects ld64.lld for Mach-O) when it can't be located. The table column stays labeledld64.lld; all other linkers and reld's absolute-path shim pass through unchanged. Applied at a single translation point (fuse_ld_value) covering the availability probe, the synthetic path, and--replay-corpus.Tests (RED → GREEN)
resolve_fuse_ldunit tests:ld64.lld→ abs path when found, →lldwhen not; all other tokens (bfd/lld/mold/wild, reld shim path) pass through untouched. clippy-D warnings, tests, andfmt --checkall green locally.🤖 Generated with Claude Code