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_session/config.rs | 4 ++-- src/librustc_session/options.rs | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'src/librustc_session') diff --git a/src/librustc_session/config.rs b/src/librustc_session/config.rs index 0dfc391d9cd..8a690621a6e 100644 --- a/src/librustc_session/config.rs +++ b/src/librustc_session/config.rs @@ -1677,12 +1677,12 @@ pub fn build_session_options(matches: &getopts::Matches) -> Options { ); } - if !cg.bitcode_in_rlib { + if !cg.embed_bitcode { match cg.lto { LtoCli::No | LtoCli::Unspecified => {} LtoCli::Yes | LtoCli::NoParam | LtoCli::Thin | LtoCli::Fat => early_error( error_format, - "options `-C bitcode-in-rlib=no` and `-C lto` are incompatible", + "options `-C embed-bitcode=no` and `-C lto` are incompatible", ), } } diff --git a/src/librustc_session/options.rs b/src/librustc_session/options.rs index be78d46b981..b03fc00d93d 100644 --- a/src/librustc_session/options.rs +++ b/src/librustc_session/options.rs @@ -651,8 +651,6 @@ options! {CodegenOptions, CodegenSetter, basic_codegen_options, ar: String = (String::new(), parse_string, [UNTRACKED], "this option is deprecated and does nothing"), - bitcode_in_rlib: bool = (true, parse_bool, [TRACKED], - "emit bitcode in rlibs (default: yes)"), code_model: Option = (None, parse_opt_string, [TRACKED], "choose the code model to use (`rustc --print code-models` for details)"), codegen_units: Option = (None, parse_opt_uint, [UNTRACKED], @@ -664,6 +662,8 @@ options! {CodegenOptions, CodegenSetter, basic_codegen_options, 2 = full debug info with variable and type information; default: 0)"), default_linker_libraries: bool = (false, parse_bool, [UNTRACKED], "allow the linker to link its default libraries (default: no)"), + embed_bitcode: bool = (true, parse_bool, [TRACKED], + "emit bitcode in rlibs (default: yes)"), extra_filename: String = (String::new(), parse_string, [UNTRACKED], "extra data to put in each output filename"), force_frame_pointers: Option = (None, parse_opt_bool, [TRACKED], @@ -806,8 +806,6 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options, "exclude the pass number when dumping MIR (used in tests) (default: no)"), dump_mir_graphviz: bool = (false, parse_bool, [UNTRACKED], "in addition to `.mir` files, create graphviz `.dot` files (default: no)"), - embed_bitcode: bool = (false, parse_bool, [TRACKED], - "embed LLVM bitcode in object files (default: no)"), emit_stack_sizes: bool = (false, parse_bool, [UNTRACKED], "emit a section containing stack size metadata (default: no)"), fewer_names: bool = (false, parse_bool, [TRACKED], -- cgit 1.4.1-3-g733a5