From 8fdbc8a6007ad9c8682184ca4c3e3e0d6ae3e54b Mon Sep 17 00:00:00 2001 From: "Kirill A. Korinsky" Date: Wed, 9 Feb 2022 05:47:47 +0100 Subject: [PATCH] `curl-sys`: never try to link with `/lib/darwin` `clang --print-search-dirs` may return `libraries: =` that leads to `/lib/darwin` which may leads to attempt to find `clang_rt.osx` inside this wired path and which fails the build. --- vendor/curl-sys/build.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vendor/curl-sys/build.rs b/vendor/curl-sys/build.rs index 64df41e995..3213c66b33 100644 --- a/vendor/curl-sys/build.rs +++ b/vendor/curl-sys/build.rs @@ -532,7 +532,9 @@ fn macos_link_search_path() -> Option { for line in stdout.lines() { if line.contains("libraries: =") { let path = line.split('=').skip(1).next()?; - return Some(format!("{}/lib/darwin", path)); + if !path.is_empty() { + return Some(format!("{}/lib/darwin", path)); + } } }