Unverified Commit 45b1b894 authored by Philip Taron's avatar Philip Taron Committed by GitHub
Browse files

lib.systems: correct and simplify canExecute condition regarding march (#479638)

parents 7118ea4a 38be8c6c
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -102,13 +102,10 @@ let
            # assume compatible cpu have all the instructions included
            final.parsed.cpu == platform.parsed.cpu
            ->
              # if both have gcc.arch defined, check whether final can execute the given platform
              # if platform has gcc.arch, final must also have and can execute the gcc.arch of platform
              (
                (final ? gcc.arch && platform ? gcc.arch)
                -> architectures.canExecute final.gcc.arch platform.gcc.arch
                platform ? gcc.arch -> final ? gcc.arch && architectures.canExecute final.gcc.arch platform.gcc.arch
              )
              # if platform has gcc.arch defined but final doesn't, don't assume it can be executed
              || (platform ? gcc.arch -> !(final ? gcc.arch))
          );

        isCompatible =