Skip to content

Commit e1d1db7

Browse files
committed
Remove TargetOptions::embed_bitcode.
It's unused by any existing targets, and soon we'll be embedding full bitcode by default anyway.
1 parent 2dcf54f commit e1d1db7

File tree

2 files changed

+8
-15
lines changed

2 files changed

+8
-15
lines changed

src/librustc_codegen_ssa/back/write.rs

+8-9
Original file line numberDiff line numberDiff line change
@@ -149,15 +149,14 @@ impl ModuleConfig {
149149
self.new_llvm_pass_manager = sess.opts.debugging_opts.new_llvm_pass_manager;
150150
self.obj_is_bitcode =
151151
sess.target.target.options.obj_is_bitcode || sess.opts.cg.linker_plugin_lto.enabled();
152-
self.embed_bitcode =
153-
if sess.target.target.options.embed_bitcode || sess.opts.debugging_opts.embed_bitcode {
154-
match sess.opts.optimize {
155-
config::OptLevel::No | config::OptLevel::Less => EmbedBitcode::Marker,
156-
_ => EmbedBitcode::Full,
157-
}
158-
} else {
159-
EmbedBitcode::None
160-
};
152+
self.embed_bitcode = if sess.opts.debugging_opts.embed_bitcode {
153+
match sess.opts.optimize {
154+
config::OptLevel::No | config::OptLevel::Less => EmbedBitcode::Marker,
155+
_ => EmbedBitcode::Full,
156+
}
157+
} else {
158+
EmbedBitcode::None
159+
};
161160

162161
// Copy what clang does by turning on loop vectorization at O2 and
163162
// slp vectorization at O3. Otherwise configure other optimization aspects

src/librustc_target/spec/mod.rs

-6
Original file line numberDiff line numberDiff line change
@@ -771,9 +771,6 @@ pub struct TargetOptions {
771771
/// rather than "default"
772772
pub default_hidden_visibility: bool,
773773

774-
/// Whether or not bitcode is embedded in object files
775-
pub embed_bitcode: bool,
776-
777774
/// Whether a .debug_gdb_scripts section will be added to the output object file
778775
pub emit_debug_gdb_scripts: bool,
779776

@@ -893,7 +890,6 @@ impl Default for TargetOptions {
893890
no_builtins: false,
894891
codegen_backend: "llvm".to_string(),
895892
default_hidden_visibility: false,
896-
embed_bitcode: false,
897893
emit_debug_gdb_scripts: true,
898894
requires_uwtable: false,
899895
simd_types_indirect: true,
@@ -1208,7 +1204,6 @@ impl Target {
12081204
key!(no_builtins, bool);
12091205
key!(codegen_backend);
12101206
key!(default_hidden_visibility, bool);
1211-
key!(embed_bitcode, bool);
12121207
key!(emit_debug_gdb_scripts, bool);
12131208
key!(requires_uwtable, bool);
12141209
key!(simd_types_indirect, bool);
@@ -1437,7 +1432,6 @@ impl ToJson for Target {
14371432
target_option_val!(no_builtins);
14381433
target_option_val!(codegen_backend);
14391434
target_option_val!(default_hidden_visibility);
1440-
target_option_val!(embed_bitcode);
14411435
target_option_val!(emit_debug_gdb_scripts);
14421436
target_option_val!(requires_uwtable);
14431437
target_option_val!(simd_types_indirect);

0 commit comments

Comments
 (0)