Skip to content

Commit

Permalink
use system library on openbsd
Browse files Browse the repository at this point in the history
compiler_rt is provided by default on OpenBSD, so use it instead of
rebuilding it from source.
  • Loading branch information
semarie committed May 12, 2018
1 parent e423f3c commit d8bbc81
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ fn main() {
return;
}

// OpenBSD provides compiler_rt by default, use it instead of rebuilding it from source
if target.contains("openbsd") {
println!("cargo:rustc-link-search=native=/usr/lib");
println!("cargo:rustc-link-lib=static=compiler_rt");
return;
}

// Forcibly enable memory intrinsics on wasm32 as we don't have a libc to
// provide them.
if target.contains("wasm32") {
Expand Down

0 comments on commit d8bbc81

Please sign in to comment.