From a5e8f466d6aa52c77a8ea6b7ca1b6a1b48960563 Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Mon, 29 Dec 2014 13:29:38 +0000 Subject: [PATCH] Effectively revert r151058 which caused Clang's unwind.h to defer to libunwind in all cases when installed. At the time, Clang's unwind.h didn't provide huge chunks of the LSB-specified unwind interface, and was generally too aenemic to use for real software. However, it has since then become a strict superset of the APIs provided by libunwind on Linux. Notably, you cannot compile llgo's libgo library against libunwind, but you can against Clang's unwind.h. So let's just use our header. =] I've checked pretty thoroughly for any incompatibilities, and I am not aware of any. An open question is whether or not we should continue to munge GNU_SOURCE here. I didn't touch that as it potentially has compatibility implications on systems I cannot easily test -- Darwin. If a Darwin maintainer can verify that this is in fact unnecessary and remove it, cool. Until then, leaving it in makes this change a no-op there, and only really relevant on Linux systems where it is pretty clearly the right way to go. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@224934 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Headers/unwind.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Headers/unwind.h b/lib/Headers/unwind.h index d388ef3cb4..90aca16aca 100644 --- a/lib/Headers/unwind.h +++ b/lib/Headers/unwind.h @@ -26,8 +26,8 @@ #ifndef __CLANG_UNWIND_H #define __CLANG_UNWIND_H -#if __has_include_next() -/* Darwin (from 11.x on) and libunwind provide an unwind.h. If that's available, +#if defined(__APPLE__) && __has_include_next() +/* Darwin (from 11.x on) provide an unwind.h. If that's available, * use it. libunwind wraps some of its definitions in #ifdef _GNU_SOURCE, * so define that around the include.*/ # ifndef _GNU_SOURCE -- 2.50.1