[PATCH] D34588: Check for _MSC_VER before define _LIBCPP_MSVCRT

Bruno Cardoso Lopes via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 26 09:29:43 PDT 2017


bruno updated this revision to Diff 103975.
bruno added a comment.

Update patch after reviewer suggestions!


https://reviews.llvm.org/D34588

Files:
  include/__config


Index: include/__config
===================================================================
--- include/__config
+++ include/__config
@@ -229,8 +229,9 @@
 #  define _LIBCPP_SHORT_WCHAR   1
 // Both MinGW and native MSVC provide a "MSVC"-like enviroment
 #  define _LIBCPP_MSVCRT_LIKE
-// If mingw not explicitly detected, assume using MS C runtime only.
-#  ifndef __MINGW32__
+// If mingw not explicitly detected, assume using MS C runtime only if
+// a MS compatibility version is specified.
+#  if defined(_MSC_VER) && !defined(__MINGW32__)
 #    define _LIBCPP_MSVCRT // Using Microsoft's C Runtime library
 #  endif
 #  if (defined(_M_AMD64) || defined(__x86_64__)) || (defined(_M_ARM) || defined(__arm__))


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34588.103975.patch
Type: text/x-patch
Size: 712 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170626/972f7e81/attachment-0001.bin>


More information about the cfe-commits mailing list