d-0003-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)
committerFabian Grünbichler <debian@fabian.gruenbichler.email>
Sun, 10 Sep 2023 17:22:53 +0000 (18:22 +0100)
Gbp-Pq: Name d-0003-cc-psm-rebuild-wasm32.patch

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

index 486d67e0bb150c529f71a913c8bb5d62faee70ee..723b2e95e9ce28431e041792b0cbebcf52239ca0 100644 (file)
@@ -2369,7 +2369,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 9d40212eb85f0dfaec8d65491f19a35243d143f0..e39549d065f0c5ba3df1aa3d15653a4b3d7b9b6a 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)),
         ("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);
     }