[PATCH] D61646: Include corecrt.h/vcruntime.h to improve MS compatibility

2019-05-09 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a subscriber: echristo. rnk added a comment. @echristo mentioned that this patch was also causing issues in another freestanding environment where _MSC_VER was defined, but no corecrt.h header existed on the system. So, I think it's likely that we don't want to do this in the long

[PATCH] D61646: Include corecrt.h/vcruntime.h to improve MS compatibility

2019-05-08 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. In D61646#1495778 , @phosek wrote: > This change broke our build which is using Clang and the > `x86_64-windows-msvc` target to cross-compile our EFI bootloader. Now the > compilation fails >

[PATCH] D61646: Include corecrt.h/vcruntime.h to improve MS compatibility

2019-05-08 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. This change broke our build which is using Clang and the `x86_64-windows-msvc` target to cross-compile our EFI bootloader. Now the compilation fails

[PATCH] D61646: Include corecrt.h/vcruntime.h to improve MS compatibility

2019-05-08 Thread Mike Rice via Phabricator via cfe-commits
mikerice added a comment. For the most part, these headers are going to be included in almost every compilation unit anyway since they will come in through other C/C++ library headers. So this would presumably affect only a small numbers of compilation units that only include stddef.h and

[PATCH] D61646: Include corecrt.h/vcruntime.h to improve MS compatibility

2019-05-08 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. I agree with that. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61646/new/ https://reviews.llvm.org/D61646 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D61646: Include corecrt.h/vcruntime.h to improve MS compatibility

2019-05-08 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. In D61646#1495517 , @thakis wrote: > Did I get the bug right that this adds almost 400kB to every file that > includes stddef.h? I didn't put much confidence in that number because it was with `-frewrite-includes` which adds line

[PATCH] D61646: Include corecrt.h/vcruntime.h to improve MS compatibility

2019-05-08 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Did I get the bug right that this adds almost 400kB to every file that includes stddef.h? Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61646/new/ https://reviews.llvm.org/D61646 ___

[PATCH] D61646: Include corecrt.h/vcruntime.h to improve MS compatibility

2019-05-08 Thread Mike Rice via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL360271: Include corecrt.h in stddef.h and vcruntime.h in stdarg.h to improve MS (authored by mikerice, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior

[PATCH] D61646: Include corecrt.h/vcruntime.h to improve MS compatibility

2019-05-07 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 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61646/new/ https://reviews.llvm.org/D61646 ___ cfe-commits mailing list

[PATCH] D61646: Include corecrt.h/vcruntime.h to improve MS compatibility

2019-05-07 Thread Mike Rice via Phabricator via cfe-commits
mikerice updated this revision to Diff 198559. mikerice added a comment. Added comments as requested. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61646/new/ https://reviews.llvm.org/D61646 Files: lib/Headers/stdarg.h lib/Headers/stddef.h test/Headers/Inputs/ms-crt/corecrt.h

[PATCH] D61646: Include corecrt.h/vcruntime.h to improve MS compatibility

2019-05-07 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: lib/Headers/stdarg.h:13 +#if defined(_MSC_VER) +#include Please add a comment about why we're including this otherwise unneeded header. Comment at: lib/Headers/stddef.h:22 + +#if defined(_MSC_VER)

[PATCH] D61646: Include corecrt.h/vcruntime.h to improve MS compatibility

2019-05-07 Thread Mike Rice via Phabricator via cfe-commits
mikerice created this revision. mikerice added reviewers: cfe-commits, rnk. Include corecrt.h in stddef.h and vcruntime.h in stdarg.h to improve MS compatibility. This allows some applications developed with MSVC to compile with clang without any extra changes. Fixes: llvm.org/PR40789