1 # RUN: lld-link /entry:main /out:%t.exe /subsystem:windows \
2 # RUN: %p/Inputs/ret42.obj
3 # RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=CHECK1 %s
5 CHECK1: MajorOperatingSystemVersion: 6
6 CHECK1: MinorOperatingSystemVersion: 0
7 CHECK1: MajorSubsystemVersion: 6
8 CHECK1: MinorSubsystemVersion: 0
9 CHECK1: Subsystem: IMAGE_SUBSYSTEM_WINDOWS_GUI
11 # RUN: lld-link /entry:main /out:%t.exe /subsystem:windows,8.9 \
12 # RUN: %p/Inputs/ret42.obj
13 # RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=CHECK2 %s
15 # RUN: lld-link /entry:main /out:%t.exe /subsystem:windows,8.09 \
16 # RUN: %p/Inputs/ret42.obj
17 # RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=CHECK2 %s
19 CHECK2: MajorOperatingSystemVersion: 8
20 CHECK2: MinorOperatingSystemVersion: 9
21 CHECK2: MajorSubsystemVersion: 8
22 CHECK2: MinorSubsystemVersion: 9
23 CHECK2: Subsystem: IMAGE_SUBSYSTEM_WINDOWS_GUI
25 # RUN: lld-link /entry:main /out:%t.exe /subsystem:default,8.9 \
26 # RUN: %p/Inputs/ret42.obj
27 # RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=CHECK3 %s
29 CHECK3: MajorOperatingSystemVersion: 8
30 CHECK3: MinorOperatingSystemVersion: 9
31 CHECK3: MajorSubsystemVersion: 8
32 CHECK3: MinorSubsystemVersion: 9
34 # RUN: lld-link /entry:main /out:%t.exe /osversion:1.2 \
35 # RUN: %p/Inputs/ret42.obj
36 # RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=CHECK4 %s
38 CHECK4: MajorOperatingSystemVersion: 1
39 CHECK4: MinorOperatingSystemVersion: 2
40 CHECK4: MajorSubsystemVersion: 6
41 CHECK4: MinorSubsystemVersion: 0
43 # RUN: lld-link /entry:main /out:%t.exe /osversion:1.2 /subsystem:default,3.4 \
44 # RUN: %p/Inputs/ret42.obj
45 # RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=CHECK5 %s
47 CHECK5: MajorOperatingSystemVersion: 1
48 CHECK5: MinorOperatingSystemVersion: 2
49 CHECK5: MajorSubsystemVersion: 3
50 CHECK5: MinorSubsystemVersion: 4