d-0004-cc-psm-rebuild-wasm32
authorDebian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
Sun, 19 Sep 2021 18:48:33 +0000 (19:48 +0100)
committerXimin Luo <infinity0@debian.org>
Sun, 19 Sep 2021 18:48:33 +0000 (19:48 +0100)
Gbp-Pq: Name d-0004-cc-psm-rebuild-wasm32.patch

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

index 9814ea7dd14e691ff5390454238193c0cf74b3a7..02a2b1e89e8fb0c60a218c75a7dc9d6deed939b2 100644 (file)
@@ -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()
index 91f5915bb6b86ccd717ca9b511f45a0122bf9552..6626e3a29397ff0aa4e7051ff6dc77978c997597 100644 (file)
@@ -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);
     }