From: Shoaib Meenai Date: Wed, 10 May 2017 21:52:39 +0000 (+0000) Subject: [libc++abi] Disable libc++ extern templates project-wide X-Git-Tag: llvmorg-5.0.0-rc1~5391 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f43726cd22b2f2539900b982a79d0186fc0a5543;p=platform%2Fupstream%2Fllvm.git [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 llvm-svn: 302739 --- diff --git a/libcxxabi/CMakeLists.txt b/libcxxabi/CMakeLists.txt index 349e613..9b3e9c4 100644 --- a/libcxxabi/CMakeLists.txt +++ b/libcxxabi/CMakeLists.txt @@ -457,6 +457,9 @@ if (LIBCXXABI_BUILD_EXTERNAL_THREAD_LIBRARY) 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() diff --git a/libcxxabi/src/cxa_demangle.cpp b/libcxxabi/src/cxa_demangle.cpp index 27579d5..7a81ecb 100644 --- a/libcxxabi/src/cxa_demangle.cpp +++ b/libcxxabi/src/cxa_demangle.cpp @@ -7,7 +7,6 @@ // //===----------------------------------------------------------------------===// -#define _LIBCPP_EXTERN_TEMPLATE(...) #define _LIBCPP_NO_EXCEPTIONS #include "__cxxabi_config.h"