mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-25 06:40:03 +00:00
Split crates and clean up structure of codebase (#294)
Co-authored-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
bf700f9012
commit
4b00f5f143
88 changed files with 2989 additions and 1423 deletions
35
.github/scripts/compile-settings.jq
vendored
Normal file
35
.github/scripts/compile-settings.jq
vendored
Normal file
|
@ -0,0 +1,35 @@
|
|||
if $for_release then {
|
||||
output: "release",
|
||||
profile: "release",
|
||||
# Use build-std to build a std library optimized for size and abort immediately on abort,
|
||||
# so that format string for `unwrap`/`expect`/`unreachable`/`panic` can be optimized out.
|
||||
args: ($matrix.release_build_args // "-Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort"),
|
||||
features: ($matrix.release_features // []),
|
||||
} else {
|
||||
output: "debug",
|
||||
profile: "dev",
|
||||
args: ($matrix.debug_build_args // ""),
|
||||
features: ($matrix.debug_features // ["rustls", "fancy-with-backtrace"]),
|
||||
} end
|
||||
|
|
||||
.rustflags = (
|
||||
if $for_release and $matrix.target == "aarch64-unknown-linux-musl" or $matrix.target == "armv7-unknown-linux-musleabihf"
|
||||
then "-C link-arg=-lgcc -Clink-arg=-static-libgcc"
|
||||
else "" end
|
||||
)
|
||||
|
|
||||
.features = (
|
||||
if (.features | length > 0)
|
||||
then "--no-default-features --features \(.features | join(","))"
|
||||
else "" end
|
||||
)
|
||||
|
|
||||
{
|
||||
CBIN: (if ($matrix.target | test("windows")) then "cargo-binstall.exe" else "cargo-binstall" end),
|
||||
CTOOL: (if ($matrix."use-cross" // false) then "cross" else "cargo" end),
|
||||
COUTPUT: .output,
|
||||
CARGS: "--target \($matrix.target) --profile \(.profile) \(.features) \(.args)",
|
||||
RUSTFLAGS: .rustflags,
|
||||
}
|
||||
|
|
||||
to_entries[] | "\(.key)=\(.value)"
|
Loading…
Add table
Add a link
Reference in a new issue