2 # RUN: rm -rf %t && split-file %s %t
4 ## Ensure that weak externals are considered during subsystem inference.
6 # RUN: llvm-mc -triple x86_64-windows-msvc -filetype obj -o %t/cui.obj %t/cui.s
7 # RUN: lld-link -out:%t/cui.exe %t/cui.obj
8 # RUN: llvm-readobj --file-headers %t/cui.exe | FileCheck --check-prefix=CUI %s
9 # RUN: llvm-mc -triple x86_64-windows-msvc -filetype obj -o %t/gui.obj %t/gui.s
10 # RUN: lld-link -out:%t/gui.exe %t/gui.obj
11 # RUN: llvm-readobj --file-headers %t/gui.exe | FileCheck --check-prefix=GUI %s
13 # CUI: Subsystem: IMAGE_SUBSYSTEM_WINDOWS_CUI
14 # GUI: Subsystem: IMAGE_SUBSYSTEM_WINDOWS_GUI
24 .global mainCRTStartup
29 .global default_WinMain
34 WinMain
= default_WinMain
36 .global WinMainCRTStartup