diff options
Diffstat (limited to 'src/librustc_codegen_llvm')
| -rw-r--r-- | src/librustc_codegen_llvm/back/link.rs | 1 | ||||
| -rw-r--r-- | src/librustc_codegen_llvm/back/linker.rs | 3 | ||||
| -rw-r--r-- | src/librustc_codegen_llvm/back/lto.rs | 3 | ||||
| -rw-r--r-- | src/librustc_codegen_llvm/back/write.rs | 5 |
4 files changed, 4 insertions, 8 deletions
diff --git a/src/librustc_codegen_llvm/back/link.rs b/src/librustc_codegen_llvm/back/link.rs index d50a56ad84a..8248385c127 100644 --- a/src/librustc_codegen_llvm/back/link.rs +++ b/src/librustc_codegen_llvm/back/link.rs @@ -1666,7 +1666,6 @@ fn relevant_lib(sess: &Session, lib: &NativeLibrary) -> bool { fn are_upstream_rust_objects_already_included(sess: &Session) -> bool { match sess.lto() { - Lto::Yes | Lto::Fat => true, Lto::Thin => { // If we defer LTO to the linker, we haven't run LTO ourselves, so diff --git a/src/librustc_codegen_llvm/back/linker.rs b/src/librustc_codegen_llvm/back/linker.rs index ebb229b7b6b..95be2d82123 100644 --- a/src/librustc_codegen_llvm/back/linker.rs +++ b/src/librustc_codegen_llvm/back/linker.rs @@ -205,13 +205,12 @@ impl<'a> GccLinker<'a> { self.linker_arg(&format!("-plugin-opt={}", opt_level)); self.linker_arg(&format!("-plugin-opt=mcpu={}", llvm_util::target_cpu(self.sess))); - match self.sess.opts.cg.lto { + match self.sess.lto() { config::Lto::Thin | config::Lto::ThinLocal => { self.linker_arg("-plugin-opt=thin"); } config::Lto::Fat | - config::Lto::Yes | config::Lto::No => { // default to regular LTO } diff --git a/src/librustc_codegen_llvm/back/lto.rs b/src/librustc_codegen_llvm/back/lto.rs index 25bc662c408..364b469738f 100644 --- a/src/librustc_codegen_llvm/back/lto.rs +++ b/src/librustc_codegen_llvm/back/lto.rs @@ -118,7 +118,7 @@ pub(crate) fn run(cgcx: &CodegenContext, Lto::ThinLocal => SymbolExportLevel::Rust, // We're doing LTO for the entire crate graph - Lto::Yes | Lto::Fat | Lto::Thin => { + Lto::Fat | Lto::Thin => { symbol_export::crates_export_threshold(&cgcx.crate_types) } @@ -201,7 +201,6 @@ pub(crate) fn run(cgcx: &CodegenContext, .map(|c| c.as_ptr()) .collect::<Vec<_>>(); match cgcx.lto { - Lto::Yes | // `-C lto` == fat LTO by default Lto::Fat => { assert!(cached_modules.is_empty()); let opt_jobs = fat_lto(cgcx, diff --git a/src/librustc_codegen_llvm/back/write.rs b/src/librustc_codegen_llvm/back/write.rs index 6b257ed4c3e..7b78d4fb4ff 100644 --- a/src/librustc_codegen_llvm/back/write.rs +++ b/src/librustc_codegen_llvm/back/write.rs @@ -937,7 +937,6 @@ fn need_pre_thin_lto_bitcode_for_incr_comp(sess: &Session) -> bool { } match sess.lto() { - Lto::Yes | Lto::Fat | Lto::No => false, Lto::Thin | @@ -1372,7 +1371,7 @@ fn execute_optimize_work_item(cgcx: &CodegenContext, // require LTO so the request for LTO is always unconditionally // passed down to the backend, but we don't actually want to do // anything about it yet until we've got a final product. - Lto::Yes | Lto::Fat | Lto::Thin => { + Lto::Fat | Lto::Thin => { cgcx.crate_types.len() != 1 || cgcx.crate_types[0] != config::CrateType::Rlib } @@ -1552,7 +1551,7 @@ fn start_executing_work(tcx: TyCtxt, exported_symbols.insert(LOCAL_CRATE, copy_symbols(LOCAL_CRATE)); Some(Arc::new(exported_symbols)) } - Lto::Yes | Lto::Fat | Lto::Thin => { + Lto::Fat | Lto::Thin => { exported_symbols.insert(LOCAL_CRATE, copy_symbols(LOCAL_CRATE)); for &cnum in tcx.crates().iter() { exported_symbols.insert(cnum, copy_symbols(cnum)); |
