u-rustc-llvm-cross-flags
authorDebian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
Sat, 28 Aug 2021 09:48:11 +0000 (10:48 +0100)
committerXimin Luo <infinity0@debian.org>
Sat, 28 Aug 2021 09:48:11 +0000 (10:48 +0100)
===================================================================

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

compiler/rustc_llvm/build.rs

index e939f4207bbb1f34bbc73dd896d96dfcf530299b..a7af28028d042c24457ddbcef0372d1fdee2d2ce 100644 (file)
@@ -248,7 +248,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:") {