From: Debian Rust Maintainers Date: Sun, 19 Sep 2021 18:48:33 +0000 (+0100) Subject: d-0004-cc-psm-rebuild-wasm32 X-Git-Tag: archive/raspbian/1.59.0+dfsg1-1_deb11u3+rpi1~2^2^2~15 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=84f917abf88ea526ed2dbb411b75142449f0549d;p=rustc-mozilla.git d-0004-cc-psm-rebuild-wasm32 Gbp-Pq: Name d-0004-cc-psm-rebuild-wasm32.patch --- diff --git a/vendor/cc/src/lib.rs b/vendor/cc/src/lib.rs index 9814ea7dd..02a2b1e89 100644 --- a/vendor/cc/src/lib.rs +++ b/vendor/cc/src/lib.rs @@ -2052,7 +2052,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/build.rs b/vendor/psm/build.rs index 91f5915bb..6626e3a29 100644 --- a/vendor/psm/build.rs +++ b/vendor/psm/build.rs @@ -27,7 +27,7 @@ fn find_assembly(arch: &str, endian: &str, os: &str, env: &str) -> Option<(&'sta ("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)), _ => None, } } @@ -61,11 +61,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); }