Skip to content

Commit 208f378

Browse files
Remove asmjs from compiler
1 parent 0c1a452 commit 208f378

File tree

5 files changed

+4
-21
lines changed

5 files changed

+4
-21
lines changed

compiler/rustc_codegen_llvm/src/back/write.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -990,11 +990,7 @@ unsafe fn embed_bitcode(
990990
// reason (see issue #90326 for historical background).
991991
let is_aix = target_is_aix(cgcx);
992992
let is_apple = target_is_apple(cgcx);
993-
if is_apple
994-
|| is_aix
995-
|| cgcx.opts.target_triple.triple().starts_with("wasm")
996-
|| cgcx.opts.target_triple.triple().starts_with("asmjs")
997-
{
993+
if is_apple || is_aix || cgcx.opts.target_triple.triple().starts_with("wasm") {
998994
// We don't need custom section flags, create LLVM globals.
999995
let llconst = common::bytes_in_context(llcx, bitcode);
1000996
let llglobal = llvm::LLVMAddGlobal(

compiler/rustc_codegen_ssa/src/back/link.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2251,9 +2251,9 @@ fn linker_with_args<'a>(
22512251
// ------------ Late order-dependent options ------------
22522252

22532253
// Doesn't really make sense.
2254-
// FIXME: In practice built-in target specs use this for arbitrary order-independent options,
2255-
// introduce a target spec option for order-independent linker options, migrate built-in specs
2256-
// to it and remove the option.
2254+
// FIXME: In practice built-in target specs use this for arbitrary order-independent options.
2255+
// Introduce a target spec option for order-independent linker options, migrate built-in specs
2256+
// to it and remove the option. Currently the last holdout is wasm32-unknown-emscripten.
22572257
add_post_link_args(cmd, sess, flavor);
22582258

22592259
Ok(cmd.take_cmd())

compiler/rustc_target/src/abi/call/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,6 @@ impl<'a, Ty> FnAbi<'a, Ty> {
836836
wasm::compute_c_abi_info(cx, self)
837837
}
838838
}
839-
"asmjs" => wasm::compute_c_abi_info(cx, self),
840839
"bpf" => bpf::compute_abi_info(self),
841840
arch => {
842841
return Err(AdjustForForeignAbiError::Unsupported {

compiler/rustc_target/src/spec/asmjs_unknown_emscripten.rs

Lines changed: 0 additions & 7 deletions
This file was deleted.

compiler/rustc_target/src/spec/mod.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1641,7 +1641,6 @@ supported_targets! {
16411641
("thumbv7a-pc-windows-msvc", thumbv7a_pc_windows_msvc),
16421642
("thumbv7a-uwp-windows-msvc", thumbv7a_uwp_windows_msvc),
16431643

1644-
("asmjs-unknown-emscripten", asmjs_unknown_emscripten),
16451644
("wasm32-unknown-emscripten", wasm32_unknown_emscripten),
16461645
("wasm32-unknown-unknown", wasm32_unknown_unknown),
16471646
("wasm32-wasi", wasm32_wasi),
@@ -2276,10 +2275,6 @@ impl TargetOptions {
22762275
add_link_args(&mut self.pre_link_args, flavor, args);
22772276
}
22782277

2279-
fn add_post_link_args(&mut self, flavor: LinkerFlavor, args: &[&'static str]) {
2280-
add_link_args(&mut self.post_link_args, flavor, args);
2281-
}
2282-
22832278
fn update_from_cli(&mut self) {
22842279
self.linker_flavor = LinkerFlavor::from_cli_json(
22852280
self.linker_flavor_json,

0 commit comments

Comments
 (0)