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

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 15 07:20:49 PST 2024


================
@@ -46,6 +47,26 @@ RUN: not lld-link -out:test.dll -machine:arm64 arm64-data-sym.obj x86_64-data-sy
 RUN:              -dll -noentry 2>&1 | FileCheck -check-prefix=INCOMPAT3 %s
 INCOMPAT3: lld-link: error: x86_64-data-sym.obj: machine type x64 conflicts with arm64
 
+arm64ec machine type can't be inferred, it must be specified explicitly.
+RUN: not lld-link -out:test.dll arm64ec-data-sym.obj \
+RUN:              -dll -noentry 2>&1 | FileCheck -check-prefix=INCOMPAT4 %s
+INCOMPAT4: lld-link: error: arm64ec-data-sym.obj: machine type arm64ec is ambiguous and cannot be inferred, use /machine:arm64ec or /machine:arm64x
+
+RUN: not lld-link -out:test.dll x86_64-data-sym.obj arm64ec-data-sym.obj \
+RUN:              -dll -noentry 2>&1 | FileCheck -check-prefix=INCOMPAT4 %s
+
+RUN: not lld-link -out:test.dll aarch64-data-sym.obj arm64ec-data-sym.obj \
+RUN:              -dll -noentry 2>&1 | FileCheck -check-prefix=INCOMPAT4 %s
+
+RUN: not lld-link -out:test.dll i686-data-sym.obj arm64ec-data-sym.obj \
+RUN:              -dll -noentry 2>&1 | FileCheck -check-prefix=INCOMPAT5 %s
+INCOMPAT5: arm64ec-data-sym.obj: machine type arm64ec conflicts with x86
+
+arm64x input implies arm64 target
+RUN: lld-link -out:test.dll -machine:arm64 arm64x-resource.obj -dll -noentry
----------------
mstorsjo wrote:

As we're explicitly specifying `-machine:arm64` here, I don't see how this triggers the implicit arm64x -> arm64 machine type handling?

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


More information about the llvm-commits mailing list