[PATCH] D50199: [MinGW] Predefine UNICODE if -municode is specified during compilation

Martin Storsjö via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 2 14:43:12 PDT 2018


mstorsjo added a comment.

In https://reviews.llvm.org/D50199#1186282, @cdavis5x wrote:

> I actually believe this is supposed to have one other effect: it sets the entry point to `wmainCRTStartup()`/`wWinMainCRTStartup()`, making the user entry point `wmain()`/`wWinMain()`, which take wide arguments:


It already does this; lld (and I guess ld.bfd as well) detect the entry point based on what symbols are available. But this flag switches between passing crt2.o and crt2u.o to the linker, essentially forcing an undefined reference to either main or wmain.


https://reviews.llvm.org/D50199





More information about the cfe-commits mailing list