mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-18 16:07:09 +00:00

The MinGW driver has separate options for OS and subsystem version. Having this available in lld-link allows the MinGW driver to both match GNU ld better and simplifies the code for merging two (potentially mismatching) arguments into one. Differential Revision: https://reviews.llvm.org/D88802
51 lines
1.8 KiB
Plaintext
51 lines
1.8 KiB
Plaintext
# RUN: lld-link /entry:main /out:%t.exe /subsystem:windows \
|
|
# RUN: %p/Inputs/ret42.obj
|
|
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=CHECK1 %s
|
|
|
|
CHECK1: MajorOperatingSystemVersion: 6
|
|
CHECK1: MinorOperatingSystemVersion: 0
|
|
CHECK1: MajorSubsystemVersion: 6
|
|
CHECK1: MinorSubsystemVersion: 0
|
|
CHECK1: Subsystem: IMAGE_SUBSYSTEM_WINDOWS_GUI
|
|
|
|
# RUN: lld-link /entry:main /out:%t.exe /subsystem:windows,8.9 \
|
|
# RUN: %p/Inputs/ret42.obj
|
|
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=CHECK2 %s
|
|
|
|
# RUN: lld-link /entry:main /out:%t.exe /subsystem:windows,8.09 \
|
|
# RUN: %p/Inputs/ret42.obj
|
|
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=CHECK2 %s
|
|
|
|
CHECK2: MajorOperatingSystemVersion: 8
|
|
CHECK2: MinorOperatingSystemVersion: 9
|
|
CHECK2: MajorSubsystemVersion: 8
|
|
CHECK2: MinorSubsystemVersion: 9
|
|
CHECK2: Subsystem: IMAGE_SUBSYSTEM_WINDOWS_GUI
|
|
|
|
# RUN: lld-link /entry:main /out:%t.exe /subsystem:default,8.9 \
|
|
# RUN: %p/Inputs/ret42.obj
|
|
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=CHECK3 %s
|
|
|
|
CHECK3: MajorOperatingSystemVersion: 8
|
|
CHECK3: MinorOperatingSystemVersion: 9
|
|
CHECK3: MajorSubsystemVersion: 8
|
|
CHECK3: MinorSubsystemVersion: 9
|
|
|
|
# RUN: lld-link /entry:main /out:%t.exe /osversion:1.2 \
|
|
# RUN: %p/Inputs/ret42.obj
|
|
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=CHECK4 %s
|
|
|
|
CHECK4: MajorOperatingSystemVersion: 1
|
|
CHECK4: MinorOperatingSystemVersion: 2
|
|
CHECK4: MajorSubsystemVersion: 6
|
|
CHECK4: MinorSubsystemVersion: 0
|
|
|
|
# RUN: lld-link /entry:main /out:%t.exe /osversion:1.2 /subsystem:default,3.4 \
|
|
# RUN: %p/Inputs/ret42.obj
|
|
# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=CHECK5 %s
|
|
|
|
CHECK5: MajorOperatingSystemVersion: 1
|
|
CHECK5: MinorOperatingSystemVersion: 2
|
|
CHECK5: MajorSubsystemVersion: 3
|
|
CHECK5: MinorSubsystemVersion: 4
|