From 303797f547974d9028517677db0edb173e66ab05 Mon Sep 17 00:00:00 2001 From: Debian Rust Maintainers Date: Sat, 7 Nov 2020 21:21:03 +0000 Subject: [PATCH] d-0004-cc-psm-rebuild-wasm32 Gbp-Pq: Name d-0004-cc-psm-rebuild-wasm32.patch --- vendor/cc/src/lib.rs | 2 +- vendor/psm/build.rs | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/vendor/cc/src/lib.rs b/vendor/cc/src/lib.rs index fecc073056..1e1b3d1ab9 100644 --- a/vendor/cc/src/lib.rs +++ b/vendor/cc/src/lib.rs @@ -2000,7 +2000,7 @@ impl Build { || target == "wasm32-unknown-wasi" || target == "wasm32-unknown-unknown" { - "clang".to_string() + "rust-clang".to_string() } else if target.contains("vxworks") { "wr-c++".to_string() } else if self.get_host()? != target { diff --git a/vendor/psm/build.rs b/vendor/psm/build.rs index 91f5915bb6..6626e3a293 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); } -- 2.30.2