rust/compiler/rustc_llvm
bors 0c72c0d11a Auto merge of #133250 - DianQK:embed-bitcode-pgo, r=nikic
The embedded bitcode should always be prepared for LTO/ThinLTO

Fixes #115344. Fixes #117220.

There are currently two methods for generating bitcode that used for LTO. One method involves using `-C linker-plugin-lto` to emit object files as bitcode, which is the typical setting used by cargo. The other method is through `-C embed-bitcode=yes`.

When using with `-C embed-bitcode=yes -C lto=no`, we run a complete non-LTO LLVM pipeline to obtain bitcode, then the bitcode is used for LTO. We run the Call Graph Profile Pass twice on the same module.

This PR is doing something similar to LLVM's `buildFatLTODefaultPipeline`, obtaining the bitcode for embedding after running `buildThinLTOPreLinkDefaultPipeline`.

r? nikic
2025-03-01 08:22:18 +00:00
..
llvm-wrapper Auto merge of #133250 - DianQK:embed-bitcode-pgo, r=nikic 2025-03-01 08:22:18 +00:00
src Make RustString an extern type to avoid improper_ctypes warnings 2024-11-09 11:07:44 +11:00
build.rs Fix overcapturing, unsafe extern blocks, and new unsafe ops 2025-02-22 00:01:48 +00:00
Cargo.toml compiler: bump cc to 1.2.16 to fix x86 Windows jobs on newest Windows SDK 2025-02-28 21:10:21 +08:00