Skip to content

Commit

Permalink
lib.system.inspect: add wasm32 to isILP32
Browse files Browse the repository at this point in the history
According to the WebAssembly design doc, wasm32 is an ILP32 ABI like
x32, mips64n32, and aarch64_ilp32 (Apple Watch).  This commits adds
it to the predicate.

  https://github.com/WebAssembly/design/blob/1319968ca53fb5c7e7ea6cc210c7b0ed46566a45/CAndC%2B%2B.md?plain=1#L16
  • Loading branch information
Adam Joseph authored and Adam Joseph committed Jan 18, 2024
1 parent ff2ab9a commit 9b4c306
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/systems/inspect.nix
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ rec {

is32bit = { cpu = { bits = 32; }; };
is64bit = { cpu = { bits = 64; }; };
isILP32 = map (a: { abi = { abi = a; }; }) [ "n32" "ilp32" "x32" ];
isILP32 = [ { cpu = { family = "wasm"; bits = 32; }; } ] ++
map (a: { abi = { abi = a; }; }) [ "n32" "ilp32" "x32" ];
isBigEndian = { cpu = { significantByte = significantBytes.bigEndian; }; };
isLittleEndian = { cpu = { significantByte = significantBytes.littleEndian; }; };

Expand Down

0 comments on commit 9b4c306

Please sign in to comment.