u-rustc-llvm-cross-flags
authorDebian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
Tue, 21 Jun 2022 10:06:16 +0000 (11:06 +0100)
committerXimin Luo <infinity0@debian.org>
Tue, 21 Jun 2022 10:06:16 +0000 (11:06 +0100)
Gbp-Pq: Name u-rustc-llvm-cross-flags.patch

compiler/rustc_llvm/build.rs

index 4d5137c04dfe31b03fe25b602969694113136a7e..fb82e2aa42feb5613a6ccf924b16a041faa13b5c 100644 (file)
@@ -237,7 +237,7 @@ fn main() {
             if let Some(stripped) = lib.strip_prefix("-LIBPATH:") {
                 println!("cargo:rustc-link-search=native={}", stripped.replace(&host, &target));
             } else if let Some(stripped) = lib.strip_prefix("-L") {
-                println!("cargo:rustc-link-search=native={}", stripped.replace(&host, &target));
+                if stripped.contains(&host) { println!("cargo:rustc-link-search=native={}", stripped.replace(&host, &target)); }
             }
         } else if let Some(stripped) = lib.strip_prefix("-LIBPATH:") {
             println!("cargo:rustc-link-search=native={}", stripped);