1 # RUN: yaml2obj %p/Inputs/machine-x64.yaml -o %t.obj
2 # RUN: lld-link -safeseh:no /entry:main /subsystem:console /out:%t.exe %t.obj
3 # RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=AMD64 %s
4 # RUN: lld-link -safeseh:no /entry:main /subsystem:console /machine:x64 \
5 # RUN: /out:%t.exe %t.obj
6 # RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=AMD64 %s
8 AMD64: Machine: IMAGE_FILE_MACHINE_AMD64
10 # RUN: yaml2obj %p/Inputs/machine-x86.yaml -o %t.obj
11 # RUN: lld-link -safeseh:no /entry:main /subsystem:console /out:%t.exe %t.obj
12 # RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=I386 %s
13 # RUN: lld-link -safeseh:no /entry:main /subsystem:console /machine:x86 \
14 # RUN: /out:%t.exe %t.obj /fixed
15 # RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=I386 %s
17 I386: Machine: IMAGE_FILE_MACHINE_I386
19 # RUN: yaml2obj %p/Inputs/machine-x64.yaml -o %t.obj
20 # RUN: not lld-link /entry:main /subsystem:console /machine:x86 \
21 # RUN: /out:%t.exe %t.obj /fixed >& %t.log
22 # RUN: FileCheck -check-prefix=INCOMPAT %s < %t.log
24 # RUN: yaml2obj %p/Inputs/machine-x86.yaml -o %t1.obj
25 # RUN: sed -e s/main/foo/ %p/Inputs/machine-x64.yaml | yaml2obj > %t2.obj
26 # RUN: not lld-link /entry:main /subsystem:console /out:%t.exe \
27 # RUN: %t1.obj %t2.obj >& %t.log
28 # RUN: FileCheck -check-prefix=INCOMPAT %s < %t.log
30 INCOMPAT: .obj: machine type x64 conflicts with x86