[cfe-commits] [libcxx] r155091 - /libcxx/trunk/src/stdexcept.cpp

Richard Smith richard-llvm at metafoo.co.uk
Wed Apr 18 18:36:12 PDT 2012


Author: rsmith
Date: Wed Apr 18 20:36:12 2012
New Revision: 155091

URL: http://llvm.org/viewvc/llvm-project?rev=155091&view=rev
Log:
libc++: only #include <cxxabi.h> if it exists. This allows libc++ to build
out of the box on Linux systems. If you're building against libc++abi, you
still need to make sure it can find <cxxabi.h> so it knows not to export
symbols which libc++abi provides.

Modified:
    libcxx/trunk/src/stdexcept.cpp

Modified: libcxx/trunk/src/stdexcept.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/stdexcept.cpp?rev=155091&r1=155090&r2=155091&view=diff
==============================================================================
--- libcxx/trunk/src/stdexcept.cpp (original)
+++ libcxx/trunk/src/stdexcept.cpp Wed Apr 18 20:36:12 2012
@@ -15,7 +15,11 @@
 #include <cstdint>
 #include <cstddef>
 #include "system_error"
+
+// Use <cxxabi.h> to determine whether we're linking against libc++abi.
+#if __has_include(<cxxabi.h>)
 #include <cxxabi.h>
+#endif
 
 // Note:  optimize for size
 





More information about the cfe-commits mailing list