[libcxxabi] r302739 - [libc++abi] Disable libc++ extern templates project-wide
Shoaib Meenai via cfe-commits
cfe-commits at lists.llvm.org
Wed May 10 14:52:40 PDT 2017
Author: smeenai
Date: Wed May 10 16:52:39 2017
New Revision: 302739
URL: http://llvm.org/viewvc/llvm-project?rev=302739&view=rev
Log:
[libc++abi] Disable libc++ extern templates project-wide
libc++abi can't depend on libc++, so disable extern templates in libc++
headers project-wide. This was previously done in cxa_demangle.cpp, but
I consider it more appropriate to do at the cmake level (since none of
libc++abi's source files can use libc++ extern templates).
I also think the _LIBCPP_NO_EXCEPTIONS in cxa_demangle.cpp is
suspicious, but I'm doing one thing at a time.
Differential Revision: https://reviews.llvm.org/D32329
Modified:
libcxxabi/trunk/CMakeLists.txt
libcxxabi/trunk/src/cxa_demangle.cpp
Modified: libcxxabi/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/CMakeLists.txt?rev=302739&r1=302738&r2=302739&view=diff
==============================================================================
--- libcxxabi/trunk/CMakeLists.txt (original)
+++ libcxxabi/trunk/CMakeLists.txt Wed May 10 16:52:39 2017
@@ -457,6 +457,9 @@ if (LIBCXXABI_BUILD_EXTERNAL_THREAD_LIBR
add_definitions(-D_LIBCPP_HAS_THREAD_LIBRARY_EXTERNAL)
endif()
+# Prevent libc++abi from having library dependencies on libc++
+add_definitions(-D_LIBCPP_DISABLE_EXTERN_TEMPLATE)
+
if (MSVC)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
endif()
Modified: libcxxabi/trunk/src/cxa_demangle.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/cxa_demangle.cpp?rev=302739&r1=302738&r2=302739&view=diff
==============================================================================
--- libcxxabi/trunk/src/cxa_demangle.cpp (original)
+++ libcxxabi/trunk/src/cxa_demangle.cpp Wed May 10 16:52:39 2017
@@ -7,7 +7,6 @@
//
//===----------------------------------------------------------------------===//
-#define _LIBCPP_EXTERN_TEMPLATE(...)
#define _LIBCPP_NO_EXCEPTIONS
#include "__cxxabi_config.h"
More information about the cfe-commits
mailing list