Closed mibere closed 3 weeks ago
I find that PGO on linux works perfectly when I do this:
$ mkdir tmp
$ cargo rustc -r --features syzygy,bindgen -- -C target-feature=+crt-static -C target-cpu=<TARGET_CPU> -C profile-generate=tmp --emit link=viridithas-profile
$ ./viridithas-profile bench
$ llvm-profdata merge -o tmp/merged.profdata tmp
$ cargo rustc -r --features syzygy,bindgen -- -C target-feature=+crt-static -C target-cpu=<TARGET_CPU> -C profile-use=tmp/merged.profdata --emit link=viridithas-pgo
I don't know if this is easily replicable on Windows.
As Rust in MSYS2 does not support PGO, I have Rust 1.79 natively installed on Windows 10 and Clang 18.1 via MSYS2.
The general compilation of Viridithas works fine and without errors. But, if someone knows how to do PGO... If I run these commands there are dozens of warnings with llvm-profdata and there is no merged.profdata.
This how-to with cargo-pgo and
rustup component add llvm-tools-preview
doesn't help either. Same error