At the moment, platform1.canExecute platform2 only checks platform1.parsed.cpu against platform2.parsed.cpu. It ignores platform.gcc.arch, which controls the use of instructions like sse3, sse4, avx, avx2, avx512, and AES -- as well as some much more mundane instructions like CRC and POPCOUNT. If you try to execute code that uses these instructions on a CPU which doesn't support them, you'll get a SIGILL.
The partial ordering of architectures and support for all these features is (mostly) already in lib/systems/architectures.nix as the inferiors attribute. We need to use it.
I will implement this.
At the moment,
platform1.canExecute platform2only checksplatform1.parsed.cpuagainstplatform2.parsed.cpu. It ignoresplatform.gcc.arch, which controls the use of instructions like sse3, sse4, avx, avx2, avx512, and AES -- as well as some much more mundane instructions like CRC and POPCOUNT. If you try to execute code that uses these instructions on a CPU which doesn't support them, you'll get aSIGILL.The partial ordering of architectures and support for all these features is (mostly) already in
lib/systems/architectures.nixas theinferiorsattribute. We need to use it.I will implement this.