https://bugs.llvm.org/show_bug.cgi?id=36523
Bug ID: 36523
Summary: /SUBSYSTEM not taken into account for automatic /ENTRY
detection
Product: lld
Version: unspecified
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: COFF
Assignee: unassignedb...@nondot.org
Reporter: alexandre.ga...@ubisoft.com
CC: llvm-bugs@lists.llvm.org
We have a case where both "main" and "WinMain" are defined in different .libs
being linked in. We also provide /SUBSYSTEM:WINDOWS on the command-line.
As per spec
(https://docs.microsoft.com/en-us/cpp/build/reference/subsystem-specify-subsystem)
specifying /SUBSYSTEM:CONSOLE shall select "main" or "wmain"; and specifying
/SUBSYSTEM:WINDOWS shall select "WinMain" or "wWinMain", whichever is present.
Given the list in lld\COFF\Driver.cpp, LinkerDriver::findDefaultEntry(),
Config->Subsystem is not taken account, which leads to "main" being selected.
For this exact same case, link.exe selects "WinMain", which follows the
/SUBSYSTEM selector.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs