Skip to content

Commit

Permalink
[OpenVAF] Fix condition for OPENVAF_LDFLAGS env var (#8109)
Browse files Browse the repository at this point in the history
This is a small upstream bug, but it turns out being able to set these
flags is essential to get linking working on macOS.
  • Loading branch information
topolarity authored Feb 15, 2024
1 parent cace4d2 commit 8ad59c2
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions O/OpenVAF/bundled/patches/fix-ldflags.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/openvaf/linker/src/lib.rs b/openvaf/linker/src/lib.rs
index 29c71eb..94c4b0f 100644
--- a/openvaf/linker/src/lib.rs
+++ b/openvaf/linker/src/lib.rs
@@ -214,7 +214,7 @@ impl dyn Linker + '_ {
if let Ok(flags) = std::env::var("OPENVAF_LDFLAGS") {
let flags = flags
.split(' ')
- .filter(|flag| flag.is_empty() && !flag.chars().all(|c| c.is_whitespace()));
+ .filter(|flag| !flag.is_empty() && !flag.chars().all(|c| c.is_whitespace()));
self.args(flags)
}
}

0 comments on commit 8ad59c2

Please sign in to comment.