Commit f1fe0c9
fix: make the benchmark core compile on Linux x86-64
CI caught two defects that an Apple arm64 machine structurally cannot:
the invariant-TSC probe called __get_cpuid and __get_cpuid_max, which
GCC and Clang declare in <cpuid.h> rather than <x86intrin.h>, and the
JSON writer declared separate std::size_t and std::uint64_t overloads,
which are the same type on the Linux x86-64 ABI and therefore a
redefinition there, although they are distinct types on Apple arm64.
The x86 header is now included on that path, and the writer keeps only
the fixed-width overloads, which is unambiguous on both ABIs since no
call site passes a bare size_t. Verified by cross-compiling the header
with -target x86_64-apple-macos13, which exercises the TSC path that
the host build compiles out entirely.
CI had been red since the bench CLI landed and I did not check it
between pushes; the failure was a build error on all three presets, so
no test result was affected, and the local macOS battery stayed green
throughout.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent a0eff6e commit f1fe0c9
1 file changed
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
| 56 | + | |
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
| |||
678 | 679 | | |
679 | 680 | | |
680 | 681 | | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
681 | 687 | | |
682 | 688 | | |
683 | | - | |
684 | 689 | | |
685 | 690 | | |
686 | 691 | | |
| |||
0 commit comments