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

2018-08-06 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC339048: [MinGW] Predefine UNICODE if -municode is specified during compilation (authored by mstorsjo, committed by ). Repository: rC Clang https://reviews.llvm.org/D50199 Files: lib/Driver/ToolChain

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

2018-08-06 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm, thanks! https://reviews.llvm.org/D50199 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cf

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

2018-08-02 Thread Martin Storsjö via Phabricator via cfe-commits
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 a

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

2018-08-02 Thread Charles Davis via Phabricator via cfe-commits
cdavis5x added a comment. Are you sure this shouldn't also define `_UNICODE`? //looks// Hmm... GCC doesn't define it. I wonder if we should anyway. A user who set `-municode` may also be using ``, and thus may want those macros set to their Unicode counterparts. I actually believe this is supp

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

2018-08-02 Thread Pirama Arumuga Nainar via Phabricator via cfe-commits
pirama added a comment. In https://reviews.llvm.org/D50199#1186164, @rnk wrote: > Does this do anything other than -DUNICODE? Maybe just translate it at the > driver level and skip the -cc1 flag? It seems odd to include predefined macros at the driver, which AFAIK is just a bridge to the fron

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

2018-08-02 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo updated this revision to Diff 158827. mstorsjo added a comment. Simplified the patch to just handle the flag within the driver, without making it a flag to cc1. https://reviews.llvm.org/D50199 Files: lib/Driver/ToolChains/Clang.cpp test/Driver/mingw.cpp Index: test/Driver/mingw.

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

2018-08-02 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In https://reviews.llvm.org/D50199#1186164, @rnk wrote: > Does this do anything other than -DUNICODE? Maybe just translate it at the > driver level and skip the -cc1 flag? Yes, that also works. Initially I looked at where to place that in lib/Driver/ToolChains/MinGW.

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

2018-08-02 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. Does this do anything other than -DUNICODE? Maybe just translate it at the driver level and skip the -cc1 flag? Repository: rC Clang https://reviews.llvm.org/D50199 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

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

2018-08-02 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. mstorsjo added reviewers: rnk, compnerd, pcc, pirama. Repository: rC Clang https://reviews.llvm.org/D50199 Files: include/clang/Basic/LangOptions.def include/clang/Driver/Options.td lib/Basic/Targets.cpp lib/Driver/ToolChains/Clang.cpp lib/Frontend/Com