Fix SPEC CPU win-arm64 build failure caused by invalid -march=armv8-a#742
Merged
Merged
Conversation
On Windows the SPEC CPU 2017 toolchain is always the x86_64 Cygwin GCC
(there is no Arm64 Cygwin distribution), so it runs under x64 emulation on
win-arm64 and targets x86_64. The PERF-SPECCPU-*.json profiles computed the
optimizing flags purely from CPU architecture:
-march={calculate("{Architecture}" == "x64" ? "native" : "armv8-a")}
On win-arm64 this produced -march=armv8-a, which the x86_64 Cygwin gcc/gfortran
reject:
cc1: error: bad value 'armv8-a' for '-march=' switch
f951: Error: bad value 'armv8-a' for '-march=' switch
Every benchmark's `specmake build` therefore failed (exit 2), but
runspeccpu.bat still returned exit 0, so SpecCpuExecutor emitted zero metrics
and the QoS goals surfaced as "metrics missing" instead of a build error.
Fix: on any Windows platform (Cygwin => x86_64), resolve -march to native.
Only linux-arm64 continues to use armv8-a.
Validated on a real win-arm64 (Cobalt 100) VM: reproduced the exact make.out
compiler error with the x86_64 Cygwin gcc 14.4.0, confirmed -march=native
compiles successfully, and added a ProfileExpressionEvaluator regression test
covering win-arm64, win-x64, linux-x64 and linux-arm64.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
AlexWFMS
approved these changes
Jul 10, 2026
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.
Problem
The
QoS_VC_*_PERF-SPECCPU-*-win-arm64goals report WORKLOAD METRICS: MISSING — VirtualClient runs for the full execution window but emits zero SPEC metrics.Root cause: on Windows the SPEC CPU 2017 toolchain is always the x86_64 Cygwin GCC (there is no Arm64 Cygwin distribution). On win-arm64 it runs under x64 emulation and targets x86_64. The
PERF-SPECCPU-*.jsonprofiles derived the optimizing flags purely from CPU architecture:On win-arm64 this yields
-march=armv8-a, which the x86_64 Cygwin gcc/gfortran reject:Every benchmark's
specmake buildfails (exit 2), butrunspeccpu.batstill returns exit 0, soSpecCpuExecutoremits no metrics and the failure surfaces as "metrics missing" rather than a build error.Fix
On any Windows platform (Cygwin ⇒ x86_64) resolve
-marchtonative. Only linux-arm64 continues to usearmv8-a.Applied to all four profiles:
PERF-SPECCPU-FPRATE/FPSPEED/INTRATE/INTSPEED.json.Validation
make.outcompiler error on a real win-arm64 (Cobalt 100) VM using x86_64 Cygwin gcc/gfortran 14.4.0, and confirmed-march=nativecompiles cleanly (exit 0).ProfileExpressionEvaluatorregression test covering win-arm64 → native, win-x64 → native, linux-x64 → native, linux-arm64 → armv8-a.SpecCpuProfileTestsparameter-inlining tests pass for all four profiles.Note
Separately,
runspeccpu.bat/SpecCpuExecutorswallow thespecmakebuild failure (exit 0), which is what turned this into a silent "metrics missing" instead of a hard failure. That robustness fix is out of scope here but worth a follow-up.