mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-16 15:21:24 +01:00
Fix native compilation on aarch64
Turns out fenix.packages.aarch64-linux.targets.x86_64-*.minimal.rustc is an x86_64 compiler. The only component that you actually need to pull from 'targets' for cross compilation is rust-std. Because x86_64-unknown-linux-gnu is first in the target list, we were getting x86 rustc and cargo binaries, making it impossible to compile grapevine on an aarch64 host. We were also missing aarch64-unknown-linux-gnu in the targets list, which is used by the default package on a aarch64 host.
This commit is contained in:
parent
65ec500d75
commit
57c79b1999
2 changed files with 9 additions and 4 deletions
12
flake.nix
12
flake.nix
|
|
@ -59,12 +59,16 @@
|
|||
toolchainFile.toolchain.components;
|
||||
targets = toolchainFile.toolchain.targets;
|
||||
fenix = inputs.fenix.packages.${pkgs.stdenv.buildPlatform.system};
|
||||
in
|
||||
fenix.combine (builtins.map
|
||||
|
||||
nativeToolchain = (fenix.fromManifestFile inputs.rust-manifest)
|
||||
.withComponents components;
|
||||
crossComponents = builtins.map
|
||||
(target:
|
||||
(fenix.targets.${target}.fromManifestFile inputs.rust-manifest)
|
||||
.withComponents components)
|
||||
targets);
|
||||
.rust-std)
|
||||
targets;
|
||||
in
|
||||
fenix.combine ([nativeToolchain] ++ crossComponents);
|
||||
|
||||
website-root = self.callPackage ./nix/pkgs/website-root {};
|
||||
});
|
||||
|
|
|
|||
|
|
@ -17,5 +17,6 @@ components = [
|
|||
targets = [
|
||||
"x86_64-unknown-linux-gnu",
|
||||
"x86_64-unknown-linux-musl",
|
||||
"aarch64-unknown-linux-gnu",
|
||||
"aarch64-unknown-linux-musl",
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue