about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNicholas Nethercote <nnethercote@mozilla.com>2020-03-24 11:50:27 +1100
committerNicholas Nethercote <nnethercote@mozilla.com>2020-03-25 14:09:27 +1100
commite1d1db790fb3b2892bbe644c2d7ce1265352b0fd (patch)
tree2f8c7690ad8628b7e1ec40456a614914bfc3539d
parent2dcf54f564c6d8bbf48960fb9aaec88a0e2e062a (diff)
downloadrust-e1d1db790fb3b2892bbe644c2d7ce1265352b0fd.tar.gz
rust-e1d1db790fb3b2892bbe644c2d7ce1265352b0fd.zip
Remove `TargetOptions::embed_bitcode`.
It's unused by any existing targets, and soon we'll be embedding full
bitcode by default anyway.
-rw-r--r--src/librustc_codegen_ssa/back/write.rs17
-rw-r--r--src/librustc_target/spec/mod.rs6
2 files changed, 8 insertions, 15 deletions
diff --git a/src/librustc_codegen_ssa/back/write.rs b/src/librustc_codegen_ssa/back/write.rs
index a4b5acdcd18..3a2ff24edb4 100644
--- a/src/librustc_codegen_ssa/back/write.rs
+++ b/src/librustc_codegen_ssa/back/write.rs
@@ -149,15 +149,14 @@ impl ModuleConfig {
         self.new_llvm_pass_manager = sess.opts.debugging_opts.new_llvm_pass_manager;
         self.obj_is_bitcode =
             sess.target.target.options.obj_is_bitcode || sess.opts.cg.linker_plugin_lto.enabled();
-        self.embed_bitcode =
-            if sess.target.target.options.embed_bitcode || sess.opts.debugging_opts.embed_bitcode {
-                match sess.opts.optimize {
-                    config::OptLevel::No | config::OptLevel::Less => EmbedBitcode::Marker,
-                    _ => EmbedBitcode::Full,
-                }
-            } else {
-                EmbedBitcode::None
-            };
+        self.embed_bitcode = if sess.opts.debugging_opts.embed_bitcode {
+            match sess.opts.optimize {
+                config::OptLevel::No | config::OptLevel::Less => EmbedBitcode::Marker,
+                _ => EmbedBitcode::Full,
+            }
+        } else {
+            EmbedBitcode::None
+        };
 
         // Copy what clang does by turning on loop vectorization at O2 and
         // slp vectorization at O3. Otherwise configure other optimization aspects
diff --git a/src/librustc_target/spec/mod.rs b/src/librustc_target/spec/mod.rs
index 6e5111bd701..6d688c12977 100644
--- a/src/librustc_target/spec/mod.rs
+++ b/src/librustc_target/spec/mod.rs
@@ -771,9 +771,6 @@ pub struct TargetOptions {
     /// rather than "default"
     pub default_hidden_visibility: bool,
 
-    /// Whether or not bitcode is embedded in object files
-    pub embed_bitcode: bool,
-
     /// Whether a .debug_gdb_scripts section will be added to the output object file
     pub emit_debug_gdb_scripts: bool,
 
@@ -893,7 +890,6 @@ impl Default for TargetOptions {
             no_builtins: false,
             codegen_backend: "llvm".to_string(),
             default_hidden_visibility: false,
-            embed_bitcode: false,
             emit_debug_gdb_scripts: true,
             requires_uwtable: false,
             simd_types_indirect: true,
@@ -1208,7 +1204,6 @@ impl Target {
         key!(no_builtins, bool);
         key!(codegen_backend);
         key!(default_hidden_visibility, bool);
-        key!(embed_bitcode, bool);
         key!(emit_debug_gdb_scripts, bool);
         key!(requires_uwtable, bool);
         key!(simd_types_indirect, bool);
@@ -1437,7 +1432,6 @@ impl ToJson for Target {
         target_option_val!(no_builtins);
         target_option_val!(codegen_backend);
         target_option_val!(default_hidden_visibility);
-        target_option_val!(embed_bitcode);
         target_option_val!(emit_debug_gdb_scripts);
         target_option_val!(requires_uwtable);
         target_option_val!(simd_types_indirect);