Skip to content

Commit

Permalink
Remove TargetOptions::embed_bitcode.
Browse files Browse the repository at this point in the history
It's unused by any existing targets, and soon we'll be embedding full
bitcode by default anyway.
  • Loading branch information
nnethercote committed Mar 25, 2020
1 parent 2dcf54f commit e1d1db7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 deletions.
17 changes: 8 additions & 9 deletions src/librustc_codegen_ssa/back/write.rs
Expand Up @@ -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
Expand Down
6 changes: 0 additions & 6 deletions src/librustc_target/spec/mod.rs
Expand Up @@ -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,

Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit e1d1db7

Please sign in to comment.