[PATCH] D28478: Check for musl-libc's max_align_t in addition to other variants.

2017-02-09 Thread David L. Jones via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL294683: Check for musl-libc's max_align_t in addition to 
other variants. (authored by dlj).

Changed prior to commit:
  https://reviews.llvm.org/D28478?vs=83681=87925#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D28478

Files:
  libcxx/trunk/include/cstddef
  libcxx/trunk/include/stddef.h


Index: libcxx/trunk/include/stddef.h
===
--- libcxx/trunk/include/stddef.h
+++ libcxx/trunk/include/stddef.h
@@ -53,7 +53,8 @@
 }
 
 // Re-use the compiler's  max_align_t where possible.
-#if !defined(__CLANG_MAX_ALIGN_T_DEFINED) && !defined(_GCC_MAX_ALIGN_T)
+#if !defined(__CLANG_MAX_ALIGN_T_DEFINED) && !defined(_GCC_MAX_ALIGN_T) && \
+!defined(__DEFINED_max_align_t)
 typedef long double max_align_t;
 #endif
 
Index: libcxx/trunk/include/cstddef
===
--- libcxx/trunk/include/cstddef
+++ libcxx/trunk/include/cstddef
@@ -48,7 +48,8 @@
 using ::ptrdiff_t;
 using ::size_t;
 
-#if defined(__CLANG_MAX_ALIGN_T_DEFINED) || defined(_GCC_MAX_ALIGN_T)
+#if defined(__CLANG_MAX_ALIGN_T_DEFINED) || defined(_GCC_MAX_ALIGN_T) || \
+defined(__DEFINED_max_align_t)
 // Re-use the compiler's  max_align_t where possible.
 using ::max_align_t;
 #else


Index: libcxx/trunk/include/stddef.h
===
--- libcxx/trunk/include/stddef.h
+++ libcxx/trunk/include/stddef.h
@@ -53,7 +53,8 @@
 }
 
 // Re-use the compiler's  max_align_t where possible.
-#if !defined(__CLANG_MAX_ALIGN_T_DEFINED) && !defined(_GCC_MAX_ALIGN_T)
+#if !defined(__CLANG_MAX_ALIGN_T_DEFINED) && !defined(_GCC_MAX_ALIGN_T) && \
+!defined(__DEFINED_max_align_t)
 typedef long double max_align_t;
 #endif
 
Index: libcxx/trunk/include/cstddef
===
--- libcxx/trunk/include/cstddef
+++ libcxx/trunk/include/cstddef
@@ -48,7 +48,8 @@
 using ::ptrdiff_t;
 using ::size_t;
 
-#if defined(__CLANG_MAX_ALIGN_T_DEFINED) || defined(_GCC_MAX_ALIGN_T)
+#if defined(__CLANG_MAX_ALIGN_T_DEFINED) || defined(_GCC_MAX_ALIGN_T) || \
+defined(__DEFINED_max_align_t)
 // Re-use the compiler's  max_align_t where possible.
 using ::max_align_t;
 #else
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D28478: Check for musl-libc's max_align_t in addition to other variants.

2017-02-09 Thread David L. Jones via Phabricator via cfe-commits
dlj added a comment.

In https://reviews.llvm.org/D28478#672959, @EricWF wrote:

> IDK how to meaningly test this though.


Heh. Well... I can tell you that with this change (and a couple of others), I'm 
able to bootstrap Clang (2-stage) using libc++ on Alpine Linux. It totally 
works, I promise! ;-)


https://reviews.llvm.org/D28478



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D28478: Check for musl-libc's max_align_t in addition to other variants.

2017-02-09 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment.

IDK how to meaningly test this though.


https://reviews.llvm.org/D28478



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D28478: Check for musl-libc's max_align_t in addition to other variants.

2017-02-09 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF accepted this revision.
EricWF added a comment.
This revision is now accepted and ready to land.

LGTM.


https://reviews.llvm.org/D28478



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D28478: Check for musl-libc's max_align_t in addition to other variants.

2017-02-09 Thread Chandler Carruth via Phabricator via cfe-commits
chandlerc added a reviewer: EricWF.
chandlerc added a comment.

This seems good to me. Check with Eric to see if we try to test this any any 
specific way?


https://reviews.llvm.org/D28478



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D28478: Check for musl-libc's max_align_t in addition to other variants.

2017-01-20 Thread David L. Jones via Phabricator via cfe-commits
dlj added a comment.

Ping?


https://reviews.llvm.org/D28478



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D28478: Check for musl-libc's max_align_t in addition to other variants.

2017-01-09 Thread David L. Jones via Phabricator via cfe-commits
dlj created this revision.
dlj added a reviewer: mclow.lists.
dlj added a subscriber: cfe-commits.

Libcxx will define its own max_align_t when it is not available. However, the
availability checks today only check for Clang's definition and GCC's
definition. In particular, it does not check for musl's definition, which is the
same as GCC's but guarded with a different macro.


https://reviews.llvm.org/D28478

Files:
  include/cstddef
  include/stddef.h


Index: include/stddef.h
===
--- include/stddef.h
+++ include/stddef.h
@@ -53,7 +53,8 @@
 }
 
 // Re-use the compiler's  max_align_t where possible.
-#if !defined(__CLANG_MAX_ALIGN_T_DEFINED) && !defined(_GCC_MAX_ALIGN_T)
+#if !defined(__CLANG_MAX_ALIGN_T_DEFINED) && !defined(_GCC_MAX_ALIGN_T) && \
+!defined(__DEFINED_max_align_t)
 typedef long double max_align_t;
 #endif
 
Index: include/cstddef
===
--- include/cstddef
+++ include/cstddef
@@ -48,7 +48,8 @@
 using ::ptrdiff_t;
 using ::size_t;
 
-#if defined(__CLANG_MAX_ALIGN_T_DEFINED) || defined(_GCC_MAX_ALIGN_T)
+#if defined(__CLANG_MAX_ALIGN_T_DEFINED) || defined(_GCC_MAX_ALIGN_T) || \
+defined(__DEFINED_max_align_t)
 // Re-use the compiler's  max_align_t where possible.
 using ::max_align_t;
 #else


Index: include/stddef.h
===
--- include/stddef.h
+++ include/stddef.h
@@ -53,7 +53,8 @@
 }
 
 // Re-use the compiler's  max_align_t where possible.
-#if !defined(__CLANG_MAX_ALIGN_T_DEFINED) && !defined(_GCC_MAX_ALIGN_T)
+#if !defined(__CLANG_MAX_ALIGN_T_DEFINED) && !defined(_GCC_MAX_ALIGN_T) && \
+!defined(__DEFINED_max_align_t)
 typedef long double max_align_t;
 #endif
 
Index: include/cstddef
===
--- include/cstddef
+++ include/cstddef
@@ -48,7 +48,8 @@
 using ::ptrdiff_t;
 using ::size_t;
 
-#if defined(__CLANG_MAX_ALIGN_T_DEFINED) || defined(_GCC_MAX_ALIGN_T)
+#if defined(__CLANG_MAX_ALIGN_T_DEFINED) || defined(_GCC_MAX_ALIGN_T) || \
+defined(__DEFINED_max_align_t)
 // Re-use the compiler's  max_align_t where possible.
 using ::max_align_t;
 #else
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits