u-rustc-llvm-cross-flags
authorDebian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
Fri, 19 Nov 2021 21:58:46 +0000 (21:58 +0000)
committerRoberto C. Sánchez <roberto@debian.org>
Fri, 19 Nov 2021 21:58:46 +0000 (21:58 +0000)
Gbp-Pq: Name u-rustc-llvm-cross-flags.patch

compiler/rustc_llvm/build.rs

index 7a91591c25d7eb4b286daba7c014f5f2e378771c..cf80a013b3207f210b3bac2b94d22e449f8e40ae 100644 (file)
@@ -249,7 +249,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);