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>
Fri, 11 Apr 2025 11:40:09 +0000 (13:40 +0200)
Forwarded: not-needed

Gbp-Pq: Topic vendor
Gbp-Pq: Name d-0003-cc-psm-rebuild-wasm32.patch

vendor/cc-1.2.0/src/lib.rs
vendor/psm-0.1.24/build.rs

index a0aaa30d460b57b562800d3689c36fac08e20242..202ff17214b73ddd99da65ceecf15d88dddebdf3 100644 (file)
@@ -2623,7 +2623,7 @@ impl Build {
         let (env, msvc, gnu, traditional, clang) = if self.cpp {
             ("CXX", "cl.exe", "g++", "c++", "clang++")
         } else {
-            ("CC", "cl.exe", "gcc", "cc", "clang")
+            ("CC", "cl.exe", "gcc", "cc", "rust-clang")
         };
 
         // On historical Solaris systems, "cc" may have been Sun Studio, which
index bc84149f83e0ad44da0ce10c5ed4bce43b3a3839..a299ab5614481112835ad4c63bcc59130c657a5b 100644 (file)
@@ -51,7 +51,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,
     }
@@ -99,11 +99,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);
     }