mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 06:00:33 +03:00
build-rust-crate: handle ILP32 platforms correctly
This commit corrects the value of `CARGO_CFG_TARGET_POINTER_WIDTH` for ILP32 machines like the Apple Watch and mips64n32.
This commit is contained in:
parent
cfb180c2f0
commit
eb98fefe24
1 changed files with 1 additions and 1 deletions
|
@ -130,7 +130,7 @@ in ''
|
|||
export CARGO_CFG_UNIX=1
|
||||
export CARGO_CFG_TARGET_ENV="gnu"
|
||||
export CARGO_CFG_TARGET_ENDIAN=${if stdenv.hostPlatform.parsed.cpu.significantByte.name == "littleEndian" then "little" else "big"}
|
||||
export CARGO_CFG_TARGET_POINTER_WIDTH=${toString stdenv.hostPlatform.parsed.cpu.bits}
|
||||
export CARGO_CFG_TARGET_POINTER_WIDTH=${with stdenv.hostPlatform; toString (if isILP32 then 32 else parsed.cpu.bits)}
|
||||
export CARGO_CFG_TARGET_VENDOR=${stdenv.hostPlatform.parsed.vendor.name}
|
||||
|
||||
export CARGO_MANIFEST_DIR=$(pwd)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue