meson
meson copied to clipboard
Add support for PGO to rust, fix clang pgo
Clang (and other LLVM compilers) handle PGO slightly differently than GCC based compilers do. The following is a short list of differences:
- LLVM compilers generate files that must be merged with llvm-profdata, GCC based compilers do not
- LLVM compilers do not generate profile data for static libraries, but GCC based compilers do
- LLVM compilers want an explicit path to put their profile data in, while GCC compilers put the data next to the .o files
Fixes #13371
Based on #13377
Is it possible to add any tests for PGO?
changes since the last version:
- made the argument name consistently
pgo_dir, since this directory is a subdirectory of the private dir - added a few tests for PGO, including mixing C and Rust