Skip to content

Commit

Permalink
Add sonames on musl
Browse files Browse the repository at this point in the history
the musl platform also supports shared objects having an SONAME, and
this function is called only when making a 'shared object', so this
should always be added

fixes 04a92bc where this was removed
even when generating a dynamic library forcefully by setting library
type to cdylib

fixes #267
  • Loading branch information
nekopsykose authored and lu-zero committed Jul 25, 2022
1 parent 41f5562 commit 38942b5
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,11 @@ impl Target {

if os == "android" {
lines.push(format!("-Wl,-soname,lib{}.so", lib_name));
} else if env != "musl"
&& (os == "linux"
|| os == "freebsd"
|| os == "dragonfly"
|| os == "netbsd"
|| os == "haiku")
} else if os == "linux"
|| os == "freebsd"
|| os == "dragonfly"
|| os == "netbsd"
|| os == "haiku"
{
lines.push(format!("-Wl,-soname,lib{}.so.{}", lib_name, major));
} else if os == "macos" || os == "ios" {
Expand Down

0 comments on commit 38942b5

Please sign in to comment.