Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build-support/rust: toTargetArch: strip off endianness #187841

Merged
merged 1 commit into from Aug 25, 2022
Merged

build-support/rust: toTargetArch: strip off endianness #187841

merged 1 commit into from Aug 25, 2022

Commits on Aug 22, 2022

  1. build-support/rust: toTargetArch: strip off endianness

    `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".
    Adam Joseph committed Aug 22, 2022
    Configuration menu
    Copy the full SHA
    8682bd0 View commit details
    Browse the repository at this point in the history