Skip to content

Commit

Permalink
build: fix build for Linux AArch64 musl targets
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexTMjugador committed Sep 17, 2023
1 parent 3a10205 commit 2a161e0
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ linker = 'aarch64-linux-gnu-gcc'

[target.aarch64-unknown-linux-musl]
linker = 'aarch64-linux-musl-gcc'
# Statically link with gcc to provide long double builtins required on Aarch64
# but not reliably provided by the Rust toolchain.
# See: https://github.com/rust-lang/rust/issues/46651#issuecomment-641172562
rustflags = ["-C", "link-arg=-lgcc"]
# Link with the C library after linking with Rust compiler builtins to prevent
# long double and atomic builtins from missing on Aarch64 platforms. See:
# https://github.com/rust-lang/rust/issues/46651#issuecomment-641172562
# https://github.com/rust-lang/rust/issues/89626#issuecomment-1686073426
rustflags = ["-C", "link-arg=-lc"]

0 comments on commit 2a161e0

Please sign in to comment.