From 9b4c306d98fe1899a6ddb8b93bb6425069304050 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Mon, 20 Nov 2023 19:31:21 -0800 Subject: [PATCH] lib.system.inspect: add wasm32 to isILP32 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 --- lib/systems/inspect.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/systems/inspect.nix b/lib/systems/inspect.nix index 5e5e92699e44..38ca9967cdde 100644 --- a/lib/systems/inspect.nix +++ b/lib/systems/inspect.nix @@ -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; }; };