8682bd0a81
`toTargetArch` in `pkgs/build-support/rust/lib/default.nix` is used to set `CARGO_CFG_TARGET_ARCH`. This environment variable is supposed to be the `<arch>` portion of an LLVM-style platform name: ``` <arch><sub>-<kernel>-<libc><abi> ``` Note that the pointer-width (the "64" in "x86_64" and "mips64") is part of `<arch>`, but the endianness (the `_be` in `aarch64_be`) is *not*. Unfortunately at the moment nixpkgs' parsed `cpuType` has no way to query for the three subparts (name, pointer-width, and subarch/endianness), nor any way to ask for just the first two parts. For now, this commit simply fixes the problem in the two cases that matter: `mips64el` and `powerpc64le`, which I believe are the only two platforms supported by both rust and nixpkgs which have a "subarchitecture". |
||
---|---|---|
.. | ||
build-rust-crate | ||
build-rust-package | ||
fetch-cargo-tarball | ||
hooks | ||
lib | ||
sysroot | ||
test/import-cargo-lock | ||
carnix.nix | ||
crates-io.nix | ||
default-crate-overrides.nix | ||
fetchcargo-default-config.toml | ||
fetchcrate.nix | ||
import-cargo-lock.nix |