mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-20 20:48:43 +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
3
.github/workflows/ci.yml
vendored
3
.github/workflows/ci.yml
vendored
|
@ -114,6 +114,5 @@ jobs:
|
||||||
# if everything succeeds and PR is ready for review, test the release/package process
|
# if everything succeeds and PR is ready for review, test the release/package process
|
||||||
release-builds:
|
release-builds:
|
||||||
if: (github.event_name == 'pull_request' && github.event.pull_request.draft == false) || github.event_name == 'workflow_dispatch'
|
if: (github.event_name == 'pull_request' && github.event.pull_request.draft == false) || github.event_name == 'workflow_dispatch'
|
||||||
needs:
|
needs: tests-pass
|
||||||
- tests-pass
|
|
||||||
uses: ./.github/workflows/release-build.yml
|
uses: ./.github/workflows/release-build.yml
|
||||||
|
|
2
.github/workflows/release-build.yml
vendored
2
.github/workflows/release-build.yml
vendored
|
@ -23,7 +23,7 @@ jobs:
|
||||||
- { o: macos-latest, t: aarch64-apple-darwin }
|
- { o: macos-latest, t: aarch64-apple-darwin }
|
||||||
- { o: ubuntu-20.04, t: x86_64-unknown-linux-gnu }
|
- { o: ubuntu-20.04, t: x86_64-unknown-linux-gnu }
|
||||||
- { o: ubuntu-20.04, t: armv7-unknown-linux-gnueabihf, c: true }
|
- { o: ubuntu-20.04, t: armv7-unknown-linux-gnueabihf, c: true }
|
||||||
- { o: ubuntu-20.04, t: aarch64-unknown-linux-gnu, c: true }
|
- { o: ubuntu-20.04, t: aarch64-unknown-linux-gnu }
|
||||||
- { o: ubuntu-latest, t: x86_64-unknown-linux-musl }
|
- { o: ubuntu-latest, t: x86_64-unknown-linux-musl }
|
||||||
- { o: ubuntu-latest, t: armv7-unknown-linux-musleabihf, c: true }
|
- { o: ubuntu-latest, t: armv7-unknown-linux-musleabihf, c: true }
|
||||||
- { o: ubuntu-latest, t: aarch64-unknown-linux-musl, c: true }
|
- { o: ubuntu-latest, t: aarch64-unknown-linux-musl, c: true }
|
||||||
|
|
20
justfile
20
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
|
# In release builds in CI, build the std library ourselves so it uses our
|
||||||
# compile profile, and optimise panic messages out with immediate abort.
|
# 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" {
|
cargo-buildstd := if (cargo-profile / ci-or-no) == "release/ci" {
|
||||||
if target == "aarch64-unknown-linux-gnu" { ""
|
" -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 { "" }
|
} else { "" }
|
||||||
|
|
||||||
# In musl release builds in CI, statically link gcclibs.
|
# 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"
|
" -C link-arg=-lgcc -C link-arg=-static-libgcc"
|
||||||
} else { "" }
|
} 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
|
# 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 { "" }
|
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)
|
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"
|
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 == "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 { "" }
|
} else { "" }
|
||||||
|
|
||||||
[linux]
|
[linux]
|
||||||
|
|
Loading…
Add table
Reference in a new issue