Merge pull request #212303 from amjoseph-nixpkgs/pr/build-rust-crate/ilp32
build-rust-crate: handle ILP32 platforms correctly
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user