Remove TargetOptions::embed_bitcode.

It's unused by any existing targets, and soon we'll be embedding full
bitcode by default anyway.
This commit is contained in:
Nicholas Nethercote 2020-03-24 11:50:27 +11:00
parent 2dcf54f564
commit e1d1db790f
2 changed files with 8 additions and 15 deletions

View file

@ -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

View file

@ -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);