Skip to content

canExecute does not understand lib.systems.architectures.inferiors #220457

@ghost

Description

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: bugSomething is broken2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions