[lld] [LLD][COFF] Require explicit specification of ARM64EC target (PR #116281)

Daniel Paoliello via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 14 13:47:32 PST 2024


================
@@ -46,6 +46,9 @@ static bool compatibleMachineType(COFFLinkerContext &ctx, MachineTypes mt) {
     return COFF::isArm64EC(mt) || mt == AMD64;
   case ARM64X:
     return COFF::isAnyArm64(mt) || mt == AMD64;
+  case IMAGE_FILE_MACHINE_UNKNOWN:
+    // The ARM64EC target must be explicitly specified and cannot be inferred.
+    return !isArm64EC(mt);
----------------
dpaoliello wrote:

To match the lines above:
```suggestion
    return !COFF::isArm64EC(mt);
```

https://github.com/llvm/llvm-project/pull/116281


More information about the llvm-commits mailing list