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_ssa/src/back | |
| 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_ssa/src/back')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/back/write.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/write.rs b/compiler/rustc_codegen_ssa/src/back/write.rs index cee177d5eec..0432659d371 100644 --- a/compiler/rustc_codegen_ssa/src/back/write.rs +++ b/compiler/rustc_codegen_ssa/src/back/write.rs @@ -891,7 +891,7 @@ fn execute_optimize_work_item<B: ExtraBackendMethods>( match lto_type { ComputedLtoType::No => finish_intra_module_work(cgcx, module, module_config), ComputedLtoType::Thin => { - let (name, thin_buffer) = B::prepare_thin(module); + let (name, thin_buffer) = B::prepare_thin(module, false); if let Some(path) = bitcode { fs::write(&path, thin_buffer.data()).unwrap_or_else(|e| { panic!("Error writing pre-lto-bitcode file `{}`: {}", path.display(), e); |
