From a9bd96e76ab5c29b7422fae648ec93d85a556e4b Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Wed, 11 Feb 2015 05:20:53 +0000 Subject: [PATCH] unwind: tweak inclusion ordering to work around GCC This is a slightly convoluted workaround. GCC does not support the __has_feature extension of clang, and this results in some issues with static_asserts. config.h defines static_assert as a macro with a C-specific trickery. This then propagates into the C++ headers included after config.h, which are used with C++11 mode, enabling constexpr constructors. The macro'ed static_assert does not get treated as the static_assert builtin, and will cause an error due to a non-empty constexpr constructor. Tweaking the include order permits the use of libc++ headers to build libunwind with GCC on Linux. llvm-svn: 228809 --- libcxxabi/src/Unwind/Unwind-EHABI.cpp | 2 ++ libcxxabi/src/Unwind/libunwind.cpp | 3 +++ 2 files changed, 5 insertions(+) diff --git a/libcxxabi/src/Unwind/Unwind-EHABI.cpp b/libcxxabi/src/Unwind/Unwind-EHABI.cpp index f740674c67c1..b296ff1b0a24 100644 --- a/libcxxabi/src/Unwind/Unwind-EHABI.cpp +++ b/libcxxabi/src/Unwind/Unwind-EHABI.cpp @@ -20,6 +20,8 @@ #include #include +#include + #include "config.h" #include "libunwind.h" #include "libunwind_ext.h" diff --git a/libcxxabi/src/Unwind/libunwind.cpp b/libcxxabi/src/Unwind/libunwind.cpp index d43e5d2e48fc..f497500da537 100644 --- a/libcxxabi/src/Unwind/libunwind.cpp +++ b/libcxxabi/src/Unwind/libunwind.cpp @@ -16,6 +16,9 @@ #include // getenv #endif #include +#include +#include +#include #include "libunwind_ext.h" #include "config.h"