[libcxx-commits] [PATCH] D158214: [libc++] Warn if an unsupported compiler is used
Nikolas Klauser via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Sep 10 14:33:07 PDT 2023
philnik updated this revision to Diff 556376.
philnik marked an inline comment as done.
philnik added a comment.
Address comments
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D158214/new/
https://reviews.llvm.org/D158214
Files:
libcxx/include/__config
Index: libcxx/include/__config
===================================================================
--- libcxx/include/__config
+++ libcxx/include/__config
@@ -25,10 +25,27 @@
# define _LIBCPP_CLANG_VER (__clang_major__ * 100 + __clang_minor__)
#elif defined(__GNUC__)
# define _LIBCPP_COMPILER_GCC
+# define _LIBCPP_GCC_VER (__GNUC__ * 100 + __GNUC_MINOR__)
#endif
#ifdef __cplusplus
+// Warn if a compiler version is used that is not supported anymore
+// LLVM RELEASE Update the minimum compiler versions
+# if defined(_LIBCPP_CLANG_VER)
+# if _LIBCPP_CLANG_VER < 1600
+# warning "Libc++ only supports Clang 16 and later"
+# endif
+# elif defined(_LIBCPP_APPLE_CLANG_VER)
+# if _LIBCPP_APPLE_CLANG_VER < 1400
+# warning "Libc++ only supports AppleClang 14 and later"
+# endif
+# elif defined(_LIBCPP_GCC_VER)
+# if _LIBCPP_GCC_VER < 1300
+# warning "Libc++ only supports GCC 13 and later"
+# endif
+# endif
+
// The attributes supported by clang are documented at https://clang.llvm.org/docs/AttributeReference.html
// _LIBCPP_VERSION represents the version of libc++, which matches the version of LLVM.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158214.556376.patch
Type: text/x-patch
Size: 1159 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230910/2b9f5c73/attachment.bin>
More information about the libcxx-commits
mailing list