u-rustc-llvm-cross-flags
authorDebian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
Sat, 7 Nov 2020 21:21:03 +0000 (21:21 +0000)
committerXimin Luo <infinity0@debian.org>
Sat, 7 Nov 2020 21:21:03 +0000 (21:21 +0000)
===================================================================

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

src/librustc_llvm/build.rs

index 5ef3afac46897ebc0d1d7b48dc657f58004f9788..dee536d81d4d6c19d774cfa7dcc0211e2ede4d83 100644 (file)
@@ -249,7 +249,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:") {