From a03257af4a578cd2b7842b6109a6d817035d7a38 Mon Sep 17 00:00:00 2001 From: Jiahao XU Date: Mon, 8 Apr 2024 22:53:39 +1000 Subject: [PATCH] Fix linking with llvm-lib Fix #1026 --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 5bccca215..17a9c057d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2472,7 +2472,7 @@ impl Build { let target = self.get_target()?; let (mut cmd, program, any_flags) = self.get_ar()?; - if target.contains("msvc") && !program.to_string_lossy().contains("llvm-") { + if target.contains("msvc") && !program.to_string_lossy().contains("llvm-ar") { // NOTE: -out: here is an I/O flag, and so must be included even if $ARFLAGS/ar_flag is // in use. -nologo on the other hand is just a regular flag, and one that we'll skip if // the caller has explicitly dictated the flags they want. See