@@ -4,6 +4,7 @@ RUN: split-file %s %t.dir && cd %t.dir
44RUN: llvm-mc -filetype=obj -triple=aarch64-windows arm64-data-sym.s -o arm64-data-sym.obj
55RUN: llvm-mc -filetype=obj -triple=arm64ec-windows arm64ec-data-sym.s -o arm64ec-data-sym.obj
66RUN: llvm-mc -filetype=obj -triple=x86_64-windows x86_64-data-sym.s -o x86_64-data-sym.obj
7+ RUN: llvm-mc -filetype=obj -triple=i686-windows x86_64-data-sym.s -o i686-data-sym.obj
78RUN: llvm-cvtres -machine:arm64x -out:arm64x-resource.obj %S/Inputs/resource.res
89
910RUN: lld-link -out:test.dll -machine:arm64ec arm64ec-data-sym.obj -dll -noentry
@@ -36,7 +37,7 @@ ARM64X-DATA: 03030303 01010101 02020202
3637
3738RUN: not lld-link -out:test.dll -machine:arm64 arm64-data-sym.obj arm64ec-data-sym.obj \
3839RUN: -dll -noentry 2>&1 | FileCheck -check-prefix=INCOMPAT1 %s
39- INCOMPAT1: lld-link: error: arm64ec-data-sym.obj: machine type arm64ec conflicts with arm64
40+ INCOMPAT1: arm64ec-data-sym.obj: machine type arm64ec conflicts with arm64
4041
4142RUN: not lld-link -out:test.dll -machine:arm64ec arm64ec-data-sym.obj arm64-data-sym.obj \
4243RUN: -dll -noentry 2>&1 | FileCheck -check-prefix=INCOMPAT2 %s
@@ -46,6 +47,26 @@ RUN: not lld-link -out:test.dll -machine:arm64 arm64-data-sym.obj x86_64-data-sy
4647RUN: -dll -noentry 2>&1 | FileCheck -check-prefix=INCOMPAT3 %s
4748INCOMPAT3: lld-link: error: x86_64-data-sym.obj: machine type x64 conflicts with arm64
4849
50+ arm64ec machine type can't be inferred, it must be specified explicitly.
51+ RUN: not lld-link -out:test.dll arm64ec-data-sym.obj \
52+ RUN: -dll -noentry 2>&1 | FileCheck -check-prefix=INCOMPAT4 %s
53+ INCOMPAT4: lld-link: error: arm64ec-data-sym.obj: machine type arm64ec is ambiguous and cannot be inferred, use /machine:arm64ec or /machine:arm64x
54+
55+ RUN: not lld-link -out:test.dll x86_64-data-sym.obj arm64ec-data-sym.obj \
56+ RUN: -dll -noentry 2>&1 | FileCheck -check-prefix=INCOMPAT4 %s
57+
58+ RUN: not lld-link -out:test.dll aarch64-data-sym.obj arm64ec-data-sym.obj \
59+ RUN: -dll -noentry 2>&1 | FileCheck -check-prefix=INCOMPAT4 %s
60+
61+ RUN: not lld-link -out:test.dll i686-data-sym.obj arm64ec-data-sym.obj \
62+ RUN: -dll -noentry 2>&1 | FileCheck -check-prefix=INCOMPAT5 %s
63+ INCOMPAT5: arm64ec-data-sym.obj: machine type arm64ec conflicts with x86
64+
65+ arm64x input implies arm64 target
66+ RUN: lld-link -out:test.dll -machine:arm64 arm64x-resource.obj -dll -noentry
67+ RUN: llvm-readobj --file-headers test.dll | FileCheck -check-prefix=ARM64-HEADER %s
68+ ARM64-HEADER: Machine: IMAGE_FILE_MACHINE_ARM64 (0xAA64)
69+
4970#--- arm64ec-data-sym.s
5071 .data
5172 .globl arm64ec_data_sym
0 commit comments