u-rustc-llvm-cross-flags
authorDebian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
Sun, 20 Dec 2020 18:52:10 +0000 (18:52 +0000)
committerXimin Luo <infinity0@debian.org>
Sun, 20 Dec 2020 18:52:10 +0000 (18:52 +0000)
===================================================================

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

compiler/rustc_llvm/build.rs

index 92cf950324cd56fac61b20aeb5a82dd92d75c5e8..c704aa5c1090132afc9945018d2709bb8fe5efda 100644 (file)
@@ -251,7 +251,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:") {