u-rustc-llvm-cross-flags
authorDebian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
Sun, 5 Jul 2020 14:06:52 +0000 (15:06 +0100)
committerXimin Luo <infinity0@debian.org>
Sun, 5 Jul 2020 14:06:52 +0000 (15:06 +0100)
===================================================================

Gbp-Pq: Name u-rustc-llvm-cross-flags.patch

src/librustc_llvm/build.rs

index b2799db53cd0ba0697c7302334ad06f191bf5e3f..42664e9204bf0728383ebba08ec406e2e562a978 100644 (file)
@@ -223,7 +223,7 @@ fn main() {
         if is_crossed {
             if lib.starts_with("-LIBPATH:") {
                 println!("cargo:rustc-link-search=native={}", lib[9..].replace(&host, &target));
-            } else if lib.starts_with("-L") {
+            } else if lib.starts_with("-L") && lib[2..].contains(&host) {
                 println!("cargo:rustc-link-search=native={}", lib[2..].replace(&host, &target));
             }
         } else if lib.starts_with("-LIBPATH:") {