Skip to content

Commit b2f67c8

Browse files
committed
Auto merge of #45041 - est31:master, r=alexcrichton
Remove support for the PNaCl target (le32-unknown-nacl) This removes support for the `le32-unknown-nacl` target which is currently supported by rustc on tier 3. Despite the "nacl" in the name, the target doesn't output native code (x86, ARM, MIPS), instead it outputs binaries in the PNaCl format. There are two reasons for the removal: * Google [has announced](https://blog.chromium.org/2017/05/goodbye-pnacl-hello-webassembly.html) deprecation of the PNaCl format. The suggestion is to migrate to wasm. Happens we already have a wasm backend! * Our PNaCl LLVM backend is provided by the fastcomp patch set that the LLVM fork used by rustc contains in addition to vanilla LLVM (`src/llvm/lib/Target/JSBackend/NaCl`). Upstream LLVM doesn't have PNaCl support. Removing PNaCl support will enable us to move away from fastcomp (#44006) and have a lighter set of patches on top of upstream LLVM inside our LLVM fork. This will help distribution packagers of Rust. Fixes #42420
2 parents dbed066 + 327116a commit b2f67c8

File tree

16 files changed

+8
-295
lines changed

16 files changed

+8
-295
lines changed

src/librustc_back/target/le32_unknown_nacl.rs

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

src/librustc_back/target/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,6 @@ supported_targets! {
215215
("i686-pc-windows-msvc", i686_pc_windows_msvc),
216216
("i586-pc-windows-msvc", i586_pc_windows_msvc),
217217

218-
("le32-unknown-nacl", le32_unknown_nacl),
219218
("asmjs-unknown-emscripten", asmjs_unknown_emscripten),
220219
("wasm32-unknown-emscripten", wasm32_unknown_emscripten),
221220
("wasm32-experimental-emscripten", wasm32_experimental_emscripten),

src/librustc_llvm/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ fn main() {
8888
let is_crossed = target != host;
8989

9090
let mut optional_components =
91-
vec!["x86", "arm", "aarch64", "mips", "powerpc", "pnacl",
91+
vec!["x86", "arm", "aarch64", "mips", "powerpc",
9292
"systemz", "jsbackend", "webassembly", "msp430", "sparc", "nvptx"];
9393

9494
let mut version_cmd = Command::new(&llvm_config);

src/librustc_llvm/lib.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -346,10 +346,6 @@ pub fn initialize_available_targets() {
346346
LLVMInitializePowerPCTargetMC,
347347
LLVMInitializePowerPCAsmPrinter,
348348
LLVMInitializePowerPCAsmParser);
349-
init_target!(llvm_component = "pnacl",
350-
LLVMInitializePNaClTargetInfo,
351-
LLVMInitializePNaClTarget,
352-
LLVMInitializePNaClTargetMC);
353349
init_target!(llvm_component = "systemz",
354350
LLVMInitializeSystemZTargetInfo,
355351
LLVMInitializeSystemZTarget,

src/librustdoc/clean/cfg.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,6 @@ impl<'a> fmt::Display for Html<'a> {
337337
"l4re" => "L4Re",
338338
"linux" => "Linux",
339339
"macos" => "macOS",
340-
"nacl" => "NaCl",
341340
"netbsd" => "NetBSD",
342341
"openbsd" => "OpenBSD",
343342
"redox" => "Redox",
@@ -886,4 +885,4 @@ mod test {
886885
only."
887886
);
888887
}
889-
}
888+
}

src/libstd/os/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ pub mod linux;
3838
#[cfg(all(not(dox), target_os = "haiku"))] pub mod haiku;
3939
#[cfg(all(not(dox), target_os = "ios"))] pub mod ios;
4040
#[cfg(all(not(dox), target_os = "macos"))] pub mod macos;
41-
#[cfg(all(not(dox), target_os = "nacl"))] pub mod nacl;
4241
#[cfg(all(not(dox), target_os = "netbsd"))] pub mod netbsd;
4342
#[cfg(all(not(dox), target_os = "openbsd"))] pub mod openbsd;
4443
#[cfg(all(not(dox), target_os = "solaris"))] pub mod solaris;

src/libstd/os/nacl/fs.rs

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

src/libstd/os/nacl/mod.rs

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

src/libstd/os/nacl/raw.rs

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

src/libstd/sys/unix/env.rs

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -118,27 +118,6 @@ pub mod os {
118118
pub const EXE_EXTENSION: &'static str = "";
119119
}
120120

121-
#[cfg(all(target_os = "nacl", not(target_arch = "le32")))]
122-
pub mod os {
123-
pub const FAMILY: &'static str = "unix";
124-
pub const OS: &'static str = "nacl";
125-
pub const DLL_PREFIX: &'static str = "lib";
126-
pub const DLL_SUFFIX: &'static str = ".so";
127-
pub const DLL_EXTENSION: &'static str = "so";
128-
pub const EXE_SUFFIX: &'static str = ".nexe";
129-
pub const EXE_EXTENSION: &'static str = "nexe";
130-
}
131-
#[cfg(all(target_os = "nacl", target_arch = "le32"))]
132-
pub mod os {
133-
pub const FAMILY: &'static str = "unix";
134-
pub const OS: &'static str = "pnacl";
135-
pub const DLL_PREFIX: &'static str = "lib";
136-
pub const DLL_SUFFIX: &'static str = ".pso";
137-
pub const DLL_EXTENSION: &'static str = "pso";
138-
pub const EXE_SUFFIX: &'static str = ".pexe";
139-
pub const EXE_EXTENSION: &'static str = "pexe";
140-
}
141-
142121
#[cfg(target_os = "haiku")]
143122
pub mod os {
144123
pub const FAMILY: &'static str = "unix";

0 commit comments

Comments
 (0)