From e1832fa4e4700a5f8935ac3e88f7688a15e17df0 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 30 Apr 2020 10:53:16 -0700 Subject: Rename `bitcode-in-rlib` option to `embed-bitcode` This commit finishes work first pioneered in #70458 and started in #71528. The `-C bitcode-in-rlib` option, which has not yet reached stable, is renamed to `-C embed-bitcode` since that more accurately reflects what it does now anyway. Various tests and such are updated along the way as well. This'll also need to be backported to the beta channel to ensure we don't accidentally stabilize `-Cbitcode-in-rlib` as well. --- src/librustc_codegen_ssa/back/write.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/librustc_codegen_ssa') diff --git a/src/librustc_codegen_ssa/back/write.rs b/src/librustc_codegen_ssa/back/write.rs index 094c57b2401..31bf064ad91 100644 --- a/src/librustc_codegen_ssa/back/write.rs +++ b/src/librustc_codegen_ssa/back/write.rs @@ -148,7 +148,7 @@ impl ModuleConfig { || sess.opts.cg.linker_plugin_lto.enabled() { EmitObj::Bitcode - } else if sess.opts.debugging_opts.embed_bitcode || need_crate_bitcode_for_rlib(sess) { + } else if need_crate_bitcode_for_rlib(sess) { let force_full = need_crate_bitcode_for_rlib(sess); match sess.opts.optimize { config::OptLevel::No | config::OptLevel::Less if !force_full => { @@ -374,7 +374,7 @@ pub struct CompiledModules { } fn need_crate_bitcode_for_rlib(sess: &Session) -> bool { - sess.opts.cg.bitcode_in_rlib + sess.opts.cg.embed_bitcode && sess.crate_types.borrow().contains(&config::CrateType::Rlib) && sess.opts.output_types.contains_key(&OutputType::Exe) } -- cgit 1.4.1-3-g733a5