From: Debian Rust Maintainers Date: Sat, 2 Oct 2021 00:08:00 +0000 (+0100) Subject: d-0003-cc-psm-rebuild-wasm32 X-Git-Tag: archive/raspbian/1.81.0+dfsg1-2+rpi1~1^2~22 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=953776eda7e5b525f4502407af36fe14061b9967;p=rustc.git d-0003-cc-psm-rebuild-wasm32 Forwarded: not-needed Gbp-Pq: Topic vendor Gbp-Pq: Name d-0003-cc-psm-rebuild-wasm32.patch --- diff --git a/vendor/cc-1.0.97/src/lib.rs b/vendor/cc-1.0.97/src/lib.rs index d7122aec1e..d2b7cf7a83 100644 --- a/vendor/cc-1.0.97/src/lib.rs +++ b/vendor/cc-1.0.97/src/lib.rs @@ -2863,7 +2863,7 @@ impl Build { || target == "wasm32-unknown-wasi" || target == "wasm32-unknown-unknown" { - "clang".to_string() + "rust-clang".to_string() } else if target.contains("vxworks") { if self.cpp { "wr-c++".to_string() diff --git a/vendor/psm-0.1.21/build.rs b/vendor/psm-0.1.21/build.rs index 9d40212eb8..e39549d065 100644 --- a/vendor/psm-0.1.21/build.rs +++ b/vendor/psm-0.1.21/build.rs @@ -50,7 +50,7 @@ fn find_assembly( ("sparc", _, _, _) => Some(("src/arch/sparc_sysv.s", true)), ("riscv32", _, _, _) => Some(("src/arch/riscv.s", true)), ("riscv64", _, _, _) => Some(("src/arch/riscv64.s", true)), - ("wasm32", _, _, _) => Some(("src/arch/wasm32.o", true)), + ("wasm32", _, _, _) => Some(("src/arch/wasm32.s", true)), ("loongarch64", _, _, _) => Some(("src/arch/loongarch64.s", true)), _ => None, } @@ -97,11 +97,8 @@ fn main() { cfg.define(&*format!("CFG_TARGET_ENV_{}", env), None); } - // For wasm targets we ship a precompiled `*.o` file so we just pass that - // directly to `ar` to assemble an archive. Otherwise we're actually - // compiling the source assembly file. if asm.ends_with(".o") { - cfg.object(asm); + panic!("Debian does not allow embedded object files in source code") } else { cfg.file(asm); }