[libcxx] r290841 - Revert r290839 - Fix configuring and building libc++ w/o an ABI library
Eric Fiselier via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 2 14:27:45 PST 2017
Author: ericwf
Date: Mon Jan 2 16:27:45 2017
New Revision: 290841
URL: http://llvm.org/viewvc/llvm-project?rev=290841&view=rev
Log:
Revert r290839 - Fix configuring and building libc++ w/o an ABI library
Modified:
libcxx/trunk/CMakeLists.txt
libcxx/trunk/cmake/Modules/HandleLibCXXABI.cmake
libcxx/trunk/lib/CMakeLists.txt
libcxx/trunk/lib/abi/CMakeLists.txt
libcxx/trunk/src/exception.cpp
libcxx/trunk/src/new.cpp
libcxx/trunk/src/stdexcept.cpp
libcxx/trunk/src/typeinfo.cpp
Modified: libcxx/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/CMakeLists.txt?rev=290841&r1=290840&r2=290841&view=diff
==============================================================================
--- libcxx/trunk/CMakeLists.txt (original)
+++ libcxx/trunk/CMakeLists.txt Mon Jan 2 16:27:45 2017
@@ -87,13 +87,13 @@ if (NOT LIBCXX_ENABLE_SHARED AND NOT LIB
endif()
# ABI Library options ---------------------------------------------------------
-set(LIBCXX_CXX_ABI "default" CACHE STRING
- "Specify C++ ABI library to use.")
-set(CXXABIS none default libcxxabi libcxxrt libstdc++ libsupc++)
+set(LIBCXX_CXX_ABI "${LIBCXX_CXX_ABI}" CACHE STRING
+ "Specify C++ ABI library to use." FORCE)
+set(CXXABIS none libcxxabi libcxxrt libstdc++ libsupc++)
set_property(CACHE LIBCXX_CXX_ABI PROPERTY STRINGS ;${CXXABIS})
# Setup the default options if LIBCXX_CXX_ABI is not specified.
-if (LIBCXX_CXX_ABI STREQUAL "default")
+if (NOT LIBCXX_CXX_ABI)
find_path(
LIBCXX_LIBCXXABI_INCLUDES_INTERNAL
cxxabi.h
@@ -107,7 +107,7 @@ if (LIBCXX_CXX_ABI STREQUAL "default")
set(LIBCXX_CXX_ABI_INCLUDE_PATHS "${LIBCXX_LIBCXXABI_INCLUDES_INTERNAL}")
set(LIBCXX_CXX_ABI_INTREE 1)
else()
- set(LIBCXX_CXX_ABI_LIBNAME "default")
+ set(LIBCXX_CXX_ABI_LIBNAME "none")
endif()
else()
set(LIBCXX_CXX_ABI_LIBNAME "${LIBCXX_CXX_ABI}")
@@ -125,7 +125,6 @@ option(LIBCXX_ENABLE_STATIC_ABI_LIBRARY
set(ENABLE_LINKER_SCRIPT_DEFAULT_VALUE OFF)
if (LLVM_HAVE_LINK_VERSION_SCRIPT AND NOT LIBCXX_ENABLE_STATIC_ABI_LIBRARY
AND NOT LIBCXX_CXX_ABI_LIBNAME STREQUAL "none"
- AND NOT LIBCXX_CXX_ABI_LIBNAME STREQUAL "default"
AND PYTHONINTERP_FOUND
AND LIBCXX_ENABLE_SHARED)
set(ENABLE_LINKER_SCRIPT_DEFAULT_VALUE ON)
Modified: libcxx/trunk/cmake/Modules/HandleLibCXXABI.cmake
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/cmake/Modules/HandleLibCXXABI.cmake?rev=290841&r1=290840&r2=290841&view=diff
==============================================================================
--- libcxx/trunk/cmake/Modules/HandleLibCXXABI.cmake (original)
+++ libcxx/trunk/cmake/Modules/HandleLibCXXABI.cmake Mon Jan 2 16:27:45 2017
@@ -102,11 +102,7 @@ elseif ("${LIBCXX_CXX_ABI_LIBNAME}" STRE
setup_abi_lib("-DLIBCXXRT"
"cxxrt" "cxxabi.h;unwind.h;unwind-arm.h;unwind-itanium.h" ""
)
-elseif ("${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "none")
- list(APPEND LIBCXX_COMPILE_FLAGS "-D_LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY")
-elseif ("${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "default")
- # Nothing TODO
-else()
+elseif (NOT "${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "none")
message(FATAL_ERROR
"Currently libstdc++, libsupc++, libcxxabi, libcxxrt and none are "
"supported for c++ abi."
Modified: libcxx/trunk/lib/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/lib/CMakeLists.txt?rev=290841&r1=290840&r2=290841&view=diff
==============================================================================
--- libcxx/trunk/lib/CMakeLists.txt (original)
+++ libcxx/trunk/lib/CMakeLists.txt Mon Jan 2 16:27:45 2017
@@ -34,7 +34,7 @@ add_link_flags_if(LIBCXX_CXX_ABI_LIBRARY
add_library_flags_if(LIBCXX_COVERAGE_LIBRARY "${LIBCXX_COVERAGE_LIBRARY}")
if (APPLE AND (LIBCXX_CXX_ABI_LIBNAME STREQUAL "libcxxabi" OR
- LIBCXX_CXX_ABI_LIBNAME STREQUAL "default"))
+ LIBCXX_CXX_ABI_LIBNAME STREQUAL "none"))
set(LIBCXX_OSX_REEXPORT_SYSTEM_ABI_LIBRARY ON)
endif()
Modified: libcxx/trunk/lib/abi/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/lib/abi/CMakeLists.txt?rev=290841&r1=290840&r2=290841&view=diff
==============================================================================
--- libcxx/trunk/lib/abi/CMakeLists.txt (original)
+++ libcxx/trunk/lib/abi/CMakeLists.txt Mon Jan 2 16:27:45 2017
@@ -5,7 +5,7 @@ if (DEFINED TARGET_TRIPLE
AND EXISTS "${CMAKE_CURRENT_LIST_DIR}/${TARGET_TRIPLE}.abilist"
AND TARGET cxx_shared
AND ("${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "libcxxabi" OR
- (APPLE AND "${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "default"))
+ (APPLE AND "${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "none"))
AND NOT LIBCXX_ABI_UNSTABLE
AND LIBCXX_ABI_VERSION EQUAL "1")
set(LIBCXX_HAS_ABILIST_CONFIGURATION 1 CACHE INTERNAL "")
Modified: libcxx/trunk/src/exception.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/exception.cpp?rev=290841&r1=290840&r2=290841&view=diff
==============================================================================
--- libcxx/trunk/src/exception.cpp (original)
+++ libcxx/trunk/src/exception.cpp Mon Jan 2 16:27:45 2017
@@ -12,8 +12,7 @@
#include "exception"
#include "new"
-#if defined(__APPLE__) && !defined(LIBCXXRT) && \
- !defined(_LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY)
+#if defined(__APPLE__) && !defined(LIBCXXRT)
#include <cxxabi.h>
using namespace __cxxabiv1;
@@ -107,8 +106,7 @@ bool uncaught_exception() _NOEXCEPT { re
int uncaught_exceptions() _NOEXCEPT
{
-#if !defined(_LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY) && \
- (defined(__APPLE__) || defined(_LIBCPPABI_VERSION))
+#if defined(__APPLE__) || defined(_LIBCPPABI_VERSION)
// on Darwin, there is a helper function so __cxa_get_globals is private
# if _LIBCPPABI_VERSION > 1101
return __cxa_uncaught_exceptions();
Modified: libcxx/trunk/src/new.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/new.cpp?rev=290841&r1=290840&r2=290841&view=diff
==============================================================================
--- libcxx/trunk/src/new.cpp (original)
+++ libcxx/trunk/src/new.cpp Mon Jan 2 16:27:45 2017
@@ -13,8 +13,7 @@
#include "new"
-#if defined(__APPLE__) && !defined(LIBCXXRT) && \
- !defined(_LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY)
+#if defined(__APPLE__) && !defined(LIBCXXRT)
#include <cxxabi.h>
#ifndef _LIBCPPABI_VERSION
@@ -27,8 +26,7 @@
#if defined(LIBCXXRT) || defined(LIBCXX_BUILDING_LIBCXXABI)
#include <cxxabi.h>
#endif // defined(LIBCXX_BUILDING_LIBCXXABI)
- #if defined(_LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY) || \
- (!defined(_LIBCPPABI_VERSION) && !defined(__GLIBCXX__))
+ #if !defined(_LIBCPPABI_VERSION) && !defined(__GLIBCXX__)
static std::new_handler __new_handler;
#endif // _LIBCPPABI_VERSION
#endif
Modified: libcxx/trunk/src/stdexcept.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/stdexcept.cpp?rev=290841&r1=290840&r2=290841&view=diff
==============================================================================
--- libcxx/trunk/src/stdexcept.cpp (original)
+++ libcxx/trunk/src/stdexcept.cpp Mon Jan 2 16:27:45 2017
@@ -14,8 +14,7 @@
#include "__refstring"
/* For _LIBCPPABI_VERSION */
-#if !defined(_LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY) && \
- (defined(LIBCXX_BUILDING_LIBCXXABI) || defined(__APPLE__) || defined(LIBCXXRT))
+#if defined(LIBCXX_BUILDING_LIBCXXABI) || defined(__APPLE__) || defined(LIBCXXRT)
#include <cxxabi.h>
#endif
Modified: libcxx/trunk/src/typeinfo.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/typeinfo.cpp?rev=290841&r1=290840&r2=290841&view=diff
==============================================================================
--- libcxx/trunk/src/typeinfo.cpp (original)
+++ libcxx/trunk/src/typeinfo.cpp Mon Jan 2 16:27:45 2017
@@ -8,19 +8,13 @@
//===----------------------------------------------------------------------===//
#include <stdlib.h>
-#if !defined(_LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY) && \
- (defined(__APPLE__) || defined(LIBCXXRT) || defined(LIBCXX_BUILDING_LIBCXXABI))
+#if defined(__APPLE__) || defined(LIBCXXRT) || \
+ defined(LIBCXX_BUILDING_LIBCXXABI)
#include <cxxabi.h>
#endif
#include "typeinfo"
-#if defined(_LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY)
-std::type_info::~type_info()
-{
-}
-#endif
-
#if !defined(LIBCXXRT) && !defined(_LIBCPPABI_VERSION)
std::bad_cast::bad_cast() _NOEXCEPT
@@ -53,7 +47,7 @@ std::bad_typeid::what() const _NOEXCEPT
return "std::bad_typeid";
}
-#if defined(__APPLE__) && !defined(_LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY)
+#ifdef __APPLE__
// On Darwin, the cxa_bad_* functions cannot be in the lower level library
// because bad_cast and bad_typeid are defined in his higher level library
void __cxxabiv1::__cxa_bad_typeid()
More information about the cfe-commits
mailing list