about summary refs log tree commit diff
path: root/src/librustc_session
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2020-04-30 10:53:16 -0700
committerAlex Crichton <alex@alexcrichton.com>2020-05-01 09:05:13 -0700
commite1832fa4e4700a5f8935ac3e88f7688a15e17df0 (patch)
tree83a9e5e259160bdfeef7c5f3cba30860144a6017 /src/librustc_session
parenteece58a8e35c444afba6fa34873bc0244e32cd29 (diff)
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.
Diffstat (limited to 'src/librustc_session')
-rw-r--r--src/librustc_session/config.rs4
-rw-r--r--src/librustc_session/options.rs6
2 files changed, 4 insertions, 6 deletions
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<String> = (None, parse_opt_string, [TRACKED],
         "choose the code model to use (`rustc --print code-models` for details)"),
     codegen_units: Option<usize> = (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<bool> = (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],