Skip to content

Commit 105cd4b

Browse files
authoredJul 17, 2020
Rollup merge of rust-lang#74394 - bjorn3:remove_emscripten_leftover, r=spastorino
Remove leftover from emscripten fastcomp support This is no longer used since rust-lang#63649
2 parents ef0540b + 4497b9a commit 105cd4b

File tree

2 files changed

+2
-13
lines changed

2 files changed

+2
-13
lines changed
 

‎src/librustc_interface/util.rs

+2-7
Original file line numberDiff line numberDiff line change
@@ -235,13 +235,8 @@ pub fn get_codegen_backend(sess: &Session) -> Box<dyn CodegenBackend> {
235235
static mut LOAD: fn() -> Box<dyn CodegenBackend> = || unreachable!();
236236

237237
INIT.call_once(|| {
238-
let codegen_name = sess
239-
.opts
240-
.debugging_opts
241-
.codegen_backend
242-
.as_ref()
243-
.unwrap_or(&sess.target.target.options.codegen_backend);
244-
let backend = match &codegen_name[..] {
238+
let codegen_name = sess.opts.debugging_opts.codegen_backend.as_deref().unwrap_or("llvm");
239+
let backend = match codegen_name {
245240
filename if filename.contains('.') => load_backend_from_dylib(filename.as_ref()),
246241
codegen_name => get_builtin_codegen_backend(codegen_name),
247242
};

‎src/librustc_target/spec/mod.rs

-6
Original file line numberDiff line numberDiff line change
@@ -938,9 +938,6 @@ pub struct TargetOptions {
938938
/// for this target unconditionally.
939939
pub no_builtins: bool,
940940

941-
/// The codegen backend to use for this target, typically "llvm"
942-
pub codegen_backend: String,
943-
944941
/// The default visibility for symbols in this target should be "hidden"
945942
/// rather than "default"
946943
pub default_hidden_visibility: bool,
@@ -1068,7 +1065,6 @@ impl Default for TargetOptions {
10681065
requires_lto: false,
10691066
singlethread: false,
10701067
no_builtins: false,
1071-
codegen_backend: "llvm".to_string(),
10721068
default_hidden_visibility: false,
10731069
emit_debug_gdb_scripts: true,
10741070
requires_uwtable: false,
@@ -1461,7 +1457,6 @@ impl Target {
14611457
key!(requires_lto, bool);
14621458
key!(singlethread, bool);
14631459
key!(no_builtins, bool);
1464-
key!(codegen_backend);
14651460
key!(default_hidden_visibility, bool);
14661461
key!(emit_debug_gdb_scripts, bool);
14671462
key!(requires_uwtable, bool);
@@ -1699,7 +1694,6 @@ impl ToJson for Target {
16991694
target_option_val!(requires_lto);
17001695
target_option_val!(singlethread);
17011696
target_option_val!(no_builtins);
1702-
target_option_val!(codegen_backend);
17031697
target_option_val!(default_hidden_visibility);
17041698
target_option_val!(emit_debug_gdb_scripts);
17051699
target_option_val!(requires_uwtable);

0 commit comments

Comments
 (0)
Please sign in to comment.