Skip to content

Commit 4cfd710

Browse files
authored
Merge pull request #241 from semarie/openbsd
use system library on openbsd
2 parents 5f9bbc9 + d8bbc81 commit 4cfd710

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

build.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ fn main() {
1010
return;
1111
}
1212

13+
// OpenBSD provides compiler_rt by default, use it instead of rebuilding it from source
14+
if target.contains("openbsd") {
15+
println!("cargo:rustc-link-search=native=/usr/lib");
16+
println!("cargo:rustc-link-lib=static=compiler_rt");
17+
return;
18+
}
19+
1320
// Forcibly enable memory intrinsics on wasm32 as we don't have a libc to
1421
// provide them.
1522
if target.contains("wasm32") {

0 commit comments

Comments
 (0)