mirror of
https://gitlab.com/famedly/conduit.git
synced 2024-12-27 04:53:50 +03:00
add static cross to aarch64-unknown-linux-musl
This commit is contained in:
parent
81ae579b25
commit
0e8e4f1083
3 changed files with 33 additions and 0 deletions
|
@ -55,6 +55,19 @@ static:x86_64-unknown-linux-musl:
|
|||
paths:
|
||||
- conduit
|
||||
|
||||
static:aarch64-unknown-linux-musl:
|
||||
stage: artifacts
|
||||
image: nixos/nix:2.19.2
|
||||
script:
|
||||
# Push artifacts and build requirements to binary cache
|
||||
- ./bin/nix-build-and-cache .#static-aarch64-unknown-linux-musl
|
||||
|
||||
# Make the output less difficult to find
|
||||
- cp result/bin/conduit conduit
|
||||
artifacts:
|
||||
paths:
|
||||
- conduit
|
||||
|
||||
oci-image:x86_64-unknown-linux-gnu:
|
||||
stage: artifacts
|
||||
image: nixos/nix:2.19.2
|
||||
|
|
19
flake.nix
19
flake.nix
|
@ -72,6 +72,24 @@
|
|||
++ lib.optionals
|
||||
(stdenv.buildPlatform.config != pkgs.stdenv.hostPlatform.config)
|
||||
["-l" "c"]
|
||||
++ lib.optionals
|
||||
# This check has to match the one [here][0]. We only need to set
|
||||
# these flags when using a different linker. Don't ask me why,
|
||||
# though, because I don't know. All I know is it breaks otherwise.
|
||||
#
|
||||
# [0]: https://github.com/NixOS/nixpkgs/blob/612f97239e2cc474c13c9dafa0df378058c5ad8d/pkgs/build-support/rust/lib/default.nix#L36-L39
|
||||
(
|
||||
pkgs.stdenv.hostPlatform.isAarch64
|
||||
&& pkgs.stdenv.hostPlatform.isStatic
|
||||
&& !pkgs.stdenv.isDarwin
|
||||
&& !pkgs.stdenv.cc.bintools.isLLVM
|
||||
)
|
||||
[
|
||||
"-l"
|
||||
"stdc++"
|
||||
"-L"
|
||||
"${stdenv.cc.cc.lib}/${stdenv.hostPlatform.config}/lib"
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -178,6 +196,7 @@
|
|||
})
|
||||
[
|
||||
"x86_64-unknown-linux-musl"
|
||||
"aarch64-unknown-linux-musl"
|
||||
]
|
||||
);
|
||||
|
||||
|
|
|
@ -18,4 +18,5 @@ components = [
|
|||
targets = [
|
||||
"x86_64-unknown-linux-gnu",
|
||||
"x86_64-unknown-linux-musl",
|
||||
"aarch64-unknown-linux-musl",
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue