Skip to content

Commit

Permalink
Add initial support for OpenBSD
Browse files Browse the repository at this point in the history
  • Loading branch information
botovq authored and lu-zero committed Nov 28, 2024
1 parent dd97c89 commit edb31b7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/build_targets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ impl FileNames {
fn from_target(target: &Target, lib_name: &str, targetdir: &Path) -> Option<Self> {
let (shared_lib, static_lib, impl_lib, debug_info, def) = match target.os.as_str() {
"none" | "linux" | "freebsd" | "dragonfly" | "netbsd" | "android" | "haiku"
| "illumos" | "emscripten" => {
| "illumos" | "openbsd" | "emscripten" => {
let static_lib = targetdir.join(format!("lib{lib_name}.a"));
let shared_lib = targetdir.join(format!("lib{lib_name}.so"));
(shared_lib, static_lib, None, None, None)
Expand Down
1 change: 1 addition & 0 deletions src/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ impl LibType {
| ("android", _)
| ("haiku", _)
| ("illumos", _)
| ("openbsd", _)
| ("emscripten", _) => LibType::So,
("macos", _) | ("ios", _) | ("tvos", _) | ("visionos", _) => LibType::Dylib,
("windows", _) => LibType::Windows,
Expand Down
1 change: 1 addition & 0 deletions src/target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ impl Target {
|| os == "netbsd"
|| os == "haiku"
|| os == "illumos"
|| os == "openbsd"
{
lines.push(if capi_config.library.versioning {
format!("-Wl,-soname,lib{lib_name}.so.{sover}")
Expand Down

0 comments on commit edb31b7

Please sign in to comment.