mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-25 14:50:04 +00:00
Try build-std with arm64 gnu (#667)
This commit is contained in:
parent
aea9df602c
commit
4b2deb19b9
3 changed files with 17 additions and 10 deletions
22
justfile
22
justfile
|
@ -46,15 +46,12 @@ ci-or-no := if ci != "" { "ci" } else { "noci" }
|
|||
|
||||
# In release builds in CI, build the std library ourselves so it uses our
|
||||
# compile profile, and optimise panic messages out with immediate abort.
|
||||
#
|
||||
# explicitly disabled on aarch64-unknown-linux-gnu due to a failing build
|
||||
cargo-buildstd := if (cargo-profile / ci-or-no) == "release/ci" {
|
||||
if target == "aarch64-unknown-linux-gnu" { ""
|
||||
} else { " -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort" }
|
||||
} else { "" }
|
||||
" -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort"
|
||||
} else { "" }
|
||||
|
||||
# In musl release builds in CI, statically link gcclibs.
|
||||
cargo-gcclibs := if (cargo-profile / ci-or-no / target-libc) == "release/ci/musl" {
|
||||
rustc-gcclibs := if (cargo-profile / ci-or-no / target-libc) == "release/ci/musl" {
|
||||
" -C link-arg=-lgcc -C link-arg=-static-libgcc"
|
||||
} else { "" }
|
||||
|
||||
|
@ -79,12 +76,23 @@ cargo-split-debuginfo := if cargo-buildstd != "" { " --config='profile.release.s
|
|||
# this should be unnecessary once ring 0.17 is released
|
||||
win-arm64-ring16 := if target == "aarch64-pc-windows-msvc" { " --config='patch.crates-io.ring.git=\"https://github.com/awakecoding/ring\"' --config='patch.crates-io.ring.branch=\"0.16.20_alpha\"'" } else { "" }
|
||||
|
||||
# MIR optimisation level (defaults to 2, bring it up to 4 for release builds)
|
||||
# disabled for now, as it ICEs
|
||||
# https://github.com/rust-lang/rust/issues/106141
|
||||
rustc-miropt := "" #if for-release != "" { " -Z mir-opt-level=4" } else { "" }
|
||||
|
||||
# ICF: link-time identical code folding
|
||||
# disabled for now, as it requires the gold linker
|
||||
rustc-icf := "" #if for-release != "" { " -C link-arg=-Wl,--icf=all" } else { "" }
|
||||
|
||||
cargo-build-args := (if for-release != "" { " --release" } else { "" }) + (if target != target-host { " --target " + target } else if cargo-buildstd != "" { " --target " + target } else { "" }) + (cargo-buildstd) + (if extra-build-args != "" { " " + extra-build-args } else { "" }) + (cargo-no-default-features) + (cargo-split-debuginfo) + (if cargo-features != "" { " --features " + cargo-features } else { "" }) + (win-arm64-ring16)
|
||||
export RUSTFLAGS := (cargo-gcclibs)
|
||||
export RUSTFLAGS := (rustc-gcclibs) + (rustc-miropt) + (rustc-icf)
|
||||
|
||||
|
||||
# libblocksruntime-dev provides compiler-rt
|
||||
ci-apt-deps := if target == "x86_64-unknown-linux-gnu" { "liblzma-dev libzip-dev libzstd-dev"
|
||||
} else if target == "x86_64-unknown-linux-musl" { "musl-tools"
|
||||
} else if target == "aarch64-unknown-linux-gnu" { "g++-aarch64-linux-gnu libc6-dev-arm64-cross binutils binutils-aarch64-linux-gnu libblocksruntime-dev"
|
||||
} else { "" }
|
||||
|
||||
[linux]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue