meson icon indicating copy to clipboard operation
meson copied to clipboard

Add support for PGO to rust, fix clang pgo

Open dcbaker opened this issue 1 year ago • 2 comments

Clang (and other LLVM compilers) handle PGO slightly differently than GCC based compilers do. The following is a short list of differences:

  1. LLVM compilers generate files that must be merged with llvm-profdata, GCC based compilers do not
  2. LLVM compilers do not generate profile data for static libraries, but GCC based compilers do
  3. 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

dcbaker avatar Jul 09 '24 19:07 dcbaker

Is it possible to add any tests for PGO?

tristan957 avatar Jul 09 '24 21:07 tristan957

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

dcbaker avatar Jul 10 '24 19:07 dcbaker