Skip to content

Commit

Permalink
Adjust imageflow_abi cargo.toml for musl
Browse files Browse the repository at this point in the history
  • Loading branch information
lilith committed Jan 21, 2025
1 parent c6a2c06 commit 082ebd0
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions imageflow_abi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,17 @@ doc = true
crate-type = ["cdylib"]
doctest = false

# Override crate-type for musl targets
[target.'cfg(target_env = "musl")'.lib]
# Specify the exact musl target triple
[target.'x86_64-unknown-linux-musl']
crate-type = ["staticlib"]
strip = true
lto = true

[target.'aarch64-unknown-linux-musl']
crate-type = ["staticlib"]
strip = true
lto = true

# Musl-specific settings - strip symbols since these are static builds
[target.'cfg(target_env = "musl")'.profile.release]
strip = true # Strip symbols only for musl builds
lto = true # Keep link-time optimization for better size/performance

[dependencies]
libc = "0.2"
Expand Down

0 comments on commit 082ebd0

Please sign in to comment.