Skip to content

Commit

Permalink
Add a workaround for libcrypt linking issue
Browse files Browse the repository at this point in the history
See #54.
  • Loading branch information
ctrueden committed Jul 31, 2024
1 parent 392c60e commit 95df6e5
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,23 @@ kotlin {
}
}
}

// NB: Tell the GNU linker to only link to shared libraries as needed.
// We do this in particular to avoid libcrypt being linked into the
// executable somehow; this matters for certain distros (e.g. Manjaro
// Linux) that do not come with libcrypt out of the box.
linuxX64 {
binaries {
all {
linkerOpts += "-Wl,--as-needed"
}
}
}
linuxArm64 {
binaries {
all {
linkerOpts += "-Wl,--as-needed"
}
}
}
}

0 comments on commit 95df6e5

Please sign in to comment.