d-0004-cc-psm-rebuild-wasm32
authorDebian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
Sat, 2 Oct 2021 00:08:00 +0000 (01:08 +0100)
committerEmilio Pozuelo Monfort <pochu@debian.org>
Mon, 18 Sep 2023 17:32:04 +0000 (18:32 +0100)
Gbp-Pq: Name d-0003-cc-psm-rebuild-wasm32.patch

vendor/cc/src/lib.rs
vendor/psm/build.rs

index e3a2b98b03e0d0f29ef61f136d3cad38a95813e9..93129313d104fabd03ba95c2ecab16d1307964d5 100644 (file)
@@ -2238,7 +2238,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()
index 01a13bf7108acb03d961ad432c1cadd3c7085052..30bd68d2f5a17910710b2b46c9c76a3e29de35f1 100644 (file)
@@ -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)),
         _ => None,
     }
 }
@@ -94,11 +94,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);
     }