Skip to content

Commit ca3a028

Browse files
authored
Rollup merge of #117338 - workingjubilee:asmjs-meets-thanatos, r=b-naber
Remove asmjs Fulfills [MCP 668](rust-lang/compiler-team#668). `asmjs-unknown-emscripten` does not work as-specified, and lacks essential upstream support for generating asm.js, so it should not exist at all.
2 parents f6dcaee + dbb2500 commit ca3a028

File tree

50 files changed

+11
-138
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+11
-138
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
@@ -2243,9 +2243,9 @@ fn linker_with_args<'a>(
22432243
// ------------ Late order-dependent options ------------
22442244

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

22512251
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/mod.rs

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

1612-
("asmjs-unknown-emscripten", asmjs_unknown_emscripten),
16131612
("wasm32-unknown-emscripten", wasm32_unknown_emscripten),
16141613
("wasm32-unknown-unknown", wasm32_unknown_unknown),
16151614
("wasm32-wasi", wasm32_wasi),
@@ -2244,10 +2243,6 @@ impl TargetOptions {
22442243
add_link_args(&mut self.pre_link_args, flavor, args);
22452244
}
22462245

2247-
fn add_post_link_args(&mut self, flavor: LinkerFlavor, args: &[&'static str]) {
2248-
add_link_args(&mut self.post_link_args, flavor, args);
2249-
}
2250-
22512246
fn update_from_cli(&mut self) {
22522247
self.linker_flavor = LinkerFlavor::from_cli_json(
22532248
self.linker_flavor_json,

library/core/src/ffi/mod.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,6 @@ impl fmt::Debug for c_void {
241241
),
242242
all(target_arch = "aarch64", any(target_os = "macos", target_os = "ios", target_os = "tvos")),
243243
target_family = "wasm",
244-
target_arch = "asmjs",
245244
target_os = "uefi",
246245
windows,
247246
))]
@@ -270,7 +269,6 @@ pub struct VaListImpl<'f> {
270269
),
271270
all(target_arch = "aarch64", any(target_os = "macos", target_os = "ios", target_os = "tvos")),
272271
target_family = "wasm",
273-
target_arch = "asmjs",
274272
target_os = "uefi",
275273
windows,
276274
))]
@@ -395,7 +393,6 @@ pub struct VaList<'a, 'f: 'a> {
395393
any(target_os = "macos", target_os = "ios", target_os = "tvos")
396394
),
397395
target_family = "wasm",
398-
target_arch = "asmjs",
399396
target_os = "uefi",
400397
windows,
401398
))]
@@ -413,7 +410,6 @@ pub struct VaList<'a, 'f: 'a> {
413410
not(any(target_os = "macos", target_os = "ios", target_os = "tvos"))
414411
),
415412
not(target_family = "wasm"),
416-
not(target_arch = "asmjs"),
417413
not(target_os = "uefi"),
418414
not(windows),
419415
))]
@@ -431,7 +427,6 @@ pub struct VaList<'a, 'f: 'a> {
431427
),
432428
all(target_arch = "aarch64", any(target_os = "macos", target_os = "ios", target_os = "tvos")),
433429
target_family = "wasm",
434-
target_arch = "asmjs",
435430
target_os = "uefi",
436431
windows,
437432
))]
@@ -461,7 +456,6 @@ impl<'f> VaListImpl<'f> {
461456
not(any(target_os = "macos", target_os = "ios", target_os = "tvos"))
462457
),
463458
not(target_family = "wasm"),
464-
not(target_arch = "asmjs"),
465459
not(target_os = "uefi"),
466460
not(windows),
467461
))]

library/std/build.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ fn main() {
2525
|| target.contains("vxworks")
2626
|| target.contains("wasm32")
2727
|| target.contains("wasm64")
28-
|| target.contains("asmjs")
2928
|| target.contains("espidf")
3029
|| target.contains("solid")
3130
|| target.contains("nintendo-3ds")

library/std/src/os/l4re/raw.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ pub use self::arch::{blkcnt_t, blksize_t, ino_t, nlink_t, off_t, stat, time_t};
3131
target_arch = "powerpc",
3232
target_arch = "sparc",
3333
target_arch = "arm",
34-
target_arch = "asmjs",
3534
target_arch = "wasm32"
3635
))]
3736
mod arch {

library/std/src/os/linux/raw.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ pub use self::arch::{blkcnt_t, blksize_t, ino_t, nlink_t, off_t, stat, time_t};
3131
target_arch = "powerpc",
3232
target_arch = "sparc",
3333
target_arch = "arm",
34-
target_arch = "asmjs",
3534
target_arch = "wasm32"
3635
))]
3736
mod arch {

library/std/src/sys/common/alloc.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ use crate::ptr;
1414
target_arch = "powerpc",
1515
target_arch = "powerpc64",
1616
target_arch = "sparc",
17-
target_arch = "asmjs",
1817
target_arch = "wasm32",
1918
target_arch = "hexagon",
2019
all(target_arch = "riscv32", not(target_os = "espidf")),

library/std/src/sys/unix/env.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -174,17 +174,6 @@ pub mod os {
174174
pub const EXE_EXTENSION: &str = "elf";
175175
}
176176

177-
#[cfg(all(target_os = "emscripten", target_arch = "asmjs"))]
178-
pub mod os {
179-
pub const FAMILY: &str = "unix";
180-
pub const OS: &str = "emscripten";
181-
pub const DLL_PREFIX: &str = "lib";
182-
pub const DLL_SUFFIX: &str = ".so";
183-
pub const DLL_EXTENSION: &str = "so";
184-
pub const EXE_SUFFIX: &str = ".js";
185-
pub const EXE_EXTENSION: &str = "js";
186-
}
187-
188177
#[cfg(all(target_os = "emscripten", target_arch = "wasm32"))]
189178
pub mod os {
190179
pub const FAMILY: &str = "unix";

0 commit comments

Comments
 (0)