Don't run LTO passes in rustc when cross-lang LTO is enabled.
This commit is contained in:
parent
a21fb3f8da
commit
34e658ebd8
1 changed files with 4 additions and 0 deletions
|
|
@ -1356,6 +1356,10 @@ fn execute_work_item(cgcx: &CodegenContext,
|
|||
// settings.
|
||||
let needs_lto = needs_lto && mtrans.kind != ModuleKind::Metadata;
|
||||
|
||||
// Don't run LTO passes when cross-lang LTO is enabled. The linker
|
||||
// will do that for us in this case.
|
||||
let needs_lto = needs_lto && !cgcx.opts.debugging_opts.cross_lang_lto;
|
||||
|
||||
if needs_lto {
|
||||
Ok(WorkItemResult::NeedsLTO(mtrans))
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue