Closed
Description
Summary
Running x perf benchmark
on Windows fails due to an invalid path to the rustc
executable.
Command Used
./x perf benchmark some-benchmark
Expected Behavior
The path to rustc
should include the platform-specific executable suffix by appending std::env::consts::EXE_SUFFIX
.
Reference:
Actual Behavior
Building bootstrap
Compiling bootstrap v0.0.0 (C:\Users\user\Desktop\projects\rust\src\bootstrap)
Finished `dev` profile [unoptimized] target(s) in 10.72s
Building stage0 tool collector (x86_64-pc-windows-msvc)
Finished `release` profile [optimized] target(s) in 1.73s
Creating a sysroot for stage1 compiler (use `rustup toolchain link 'name' build/host/stage1`)
Using database `C:\Users\user\Desktop\projects\rust\build\tmp\rustc-perf\results\results.db`
collector error: failed to canonicalize rustc executable "C:\\Users\\user\\Desktop\\projects\\rust\\build\\x86_64-pc-windows-msvc\\stage1\\bin/rustc"
Caused by:
The system cannot find the file specified. (os error 2)
Command has failed. Rerun with -v to see more details.
Bootstrap Configuration (bootstrap.toml
)
# See bootstrap.example.toml for documentation of available options
profile = "library"
change-id = 140732
Operating System
Windows 11
Git Commit
> git rev-parse HEAD
a8e4c68dcb4dc1e48a0db294c5323cab0227fcb9
Additional Context
The error seems to be caused by using a forward slash (/
) instead of a backslash (\
) in the rustc
path, and by not appending .exe
on Windows. Adding the correct executable suffix should resolve the issue.