u-rustc-llvm-cross-flags
authorDebian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
Thu, 4 Aug 2022 07:50:12 +0000 (08:50 +0100)
committerEmilio Pozuelo Monfort <pochu@debian.org>
Thu, 4 Aug 2022 07:50:12 +0000 (08:50 +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);