Skip to content

Commit b3a3ce8

Browse files
authored
Never try to link with /lib/darwin (#435)
`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.
1 parent 490ca13 commit b3a3ce8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

curl-sys/build.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,9 @@ fn macos_link_search_path() -> Option<String> {
572572
for line in stdout.lines() {
573573
if line.contains("libraries: =") {
574574
let path = line.split('=').nth(1)?;
575-
return Some(format!("{}/lib/darwin", path));
575+
if !path.is_empty() {
576+
return Some(format!("{}/lib/darwin", path));
577+
}
576578
}
577579
}
578580

0 commit comments

Comments
 (0)