Skip to content

Commit

Permalink
fix(build): add compile flags for some more musl targets
Browse files Browse the repository at this point in the history
  • Loading branch information
usagi-flow committed Mar 26, 2023
1 parent e8850c2 commit 9089ee1
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,16 @@
xtask = "run --package xtask --"
integration-test = "test --features integration --profile integration --workspace --test integration"

[target.aarch64-unknown-linux-musl]
# By default, on musl linux, statically linked binaries are produced.
# But such binaries do not support loading libraries using `dlopen()` ("libloading" crate),
# which is required for loading treesitter grammars.
[target.arm-unknown-linux-musleabihf]
rustflags = ["-C", "target-feature=-crt-static"]
[target.armv7-unknown-linux-musleabihf]
rustflags = ["-C", "target-feature=-crt-static"]
[target.aarch64-unknown-linux-musl]
rustflags = ["-C", "target-feature=-crt-static"]
[target.i686-unknown-linux-musl]
rustflags = ["-C", "target-feature=-crt-static"]
[target.x86_64-unknown-linux-musl]
rustflags = ["-C", "target-feature=-crt-static"]

0 comments on commit 9089ee1

Please sign in to comment.