diff options
| author | Augie Fackler <augie@google.com> | 2024-05-23 14:58:30 -0400 |
|---|---|---|
| committer | Augie Fackler <augie@google.com> | 2024-05-23 14:58:30 -0400 |
| commit | de8200c5a441079cfaadd383a8b6897155bfa2c6 (patch) | |
| tree | 02bfba609bdfcc97f8e33bcc29ee1eb88e78a7f3 /compiler/rustc_codegen_llvm/src/llvm | |
| parent | 03d5556ced2d8ce84b9f5da702ac755aa98f7603 (diff) | |
| download | rust-de8200c5a441079cfaadd383a8b6897155bfa2c6.tar.gz rust-de8200c5a441079cfaadd383a8b6897155bfa2c6.zip | |
thinlto: only build summary file if needed
If we don't do this, some versions of LLVM (at least 17, experimentally) will double-emit some error messages, which is how I noticed this. Given that it seems to be costing some extra work, let's only request the summary bitcode production if we'll actually bother writing it down, otherwise skip it.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/llvm')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/llvm/ffi.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_llvm/src/llvm/ffi.rs b/compiler/rustc_codegen_llvm/src/llvm/ffi.rs index 648e7f12890..1e84c2be3c6 100644 --- a/compiler/rustc_codegen_llvm/src/llvm/ffi.rs +++ b/compiler/rustc_codegen_llvm/src/llvm/ffi.rs @@ -2350,7 +2350,7 @@ extern "C" { #[allow(improper_ctypes)] pub fn LLVMRustModuleInstructionStats(M: &Module, Str: &RustString); - pub fn LLVMRustThinLTOBufferCreate(M: &Module, is_thin: bool) -> &'static mut ThinLTOBuffer; + pub fn LLVMRustThinLTOBufferCreate(M: &Module, is_thin: bool, emit_summary: bool) -> &'static mut ThinLTOBuffer; pub fn LLVMRustThinLTOBufferFree(M: &'static mut ThinLTOBuffer); pub fn LLVMRustThinLTOBufferPtr(M: &ThinLTOBuffer) -> *const c_char; pub fn LLVMRustThinLTOBufferLen(M: &ThinLTOBuffer) -> size_t; |
