summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2014-12-29 13:29:38 +0000
committerChandler Carruth <chandlerc@gmail.com>2014-12-29 13:29:38 +0000
commit032d422d2e28a0b116f6aa465d098141e1d36a59 (patch)
tree29e90fe5a8c42de2d594d577e07545b217db64f8
parentf3cabbd424c95ea182814cf3939f60e94e031e4c (diff)
downloadbcm5719-llvm-032d422d2e28a0b116f6aa465d098141e1d36a59.tar.gz
bcm5719-llvm-032d422d2e28a0b116f6aa465d098141e1d36a59.zip
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. llvm-svn: 224934
-rw-r--r--clang/lib/Headers/unwind.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Headers/unwind.h b/clang/lib/Headers/unwind.h
index d388ef3cb41..90aca16aca3 100644
--- a/clang/lib/Headers/unwind.h
+++ b/clang/lib/Headers/unwind.h
@@ -26,8 +26,8 @@
#ifndef __CLANG_UNWIND_H
#define __CLANG_UNWIND_H
-#if __has_include_next(<unwind.h>)
-/* Darwin (from 11.x on) and libunwind provide an unwind.h. If that's available,
+#if defined(__APPLE__) && __has_include_next(<unwind.h>)
+/* 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
OpenPOWER on IntegriCloud