diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt index 2c07e84a293a..27d9c0a52c1d 100644 --- a/llvm/CMakeLists.txt +++ b/llvm/CMakeLists.txt @@ -392,14 +392,6 @@ if(LLVM_LINK_LLVM_DYLIB OR LLVM_BUILD_LLVM_C_DYLIB) set(LLVM_BUILD_LLVM_DYLIB_default ON) endif() option(LLVM_BUILD_LLVM_DYLIB "Build libllvm dynamic library" ${LLVM_BUILD_LLVM_DYLIB_default}) -set(LLVM_DISABLE_LLVM_DYLIB_ATEXIT_DEFAULT ON) -if (LLVM_LINK_LLVM_DYLIB) - set(LLVM_DISABLE_LLVM_DYLIB_ATEXIT_DEFAULT OFF) -endif() -option(LLVM_DISABLE_LLVM_DYLIB_ATEXIT "Disable llvm-shlib's atexit destructors." ${LLVM_DISABLE_LLVM_DYLIB_ATEXIT_DEFAULT}) -if(LLVM_DISABLE_LLVM_DYLIB_ATEXIT) - set(DISABLE_LLVM_DYLIB_ATEXIT 1) -endif() option(LLVM_OPTIMIZED_TABLEGEN "Force TableGen to be built with optimization" OFF) if(CMAKE_CROSSCOMPILING OR (LLVM_OPTIMIZED_TABLEGEN AND LLVM_ENABLE_ASSERTIONS)) @@ -778,7 +770,7 @@ if(LLVM_DISTRIBUTION_COMPONENTS) if(CMAKE_CONFIGURATION_TYPES) message(FATAL_ERROR "LLVM_DISTRIBUTION_COMPONENTS cannot be specified with multi-configuration generators (i.e. Xcode or Visual Studio)") endif() - + add_custom_target(distribution) add_custom_target(install-distribution) foreach(target ${LLVM_DISTRIBUTION_COMPONENTS}) diff --git a/llvm/include/llvm/Config/config.h.cmake b/llvm/include/llvm/Config/config.h.cmake index 40520e29995c..2adc8527c805 100644 --- a/llvm/include/llvm/Config/config.h.cmake +++ b/llvm/include/llvm/Config/config.h.cmake @@ -13,9 +13,6 @@ /* Define to enable crash overrides */ #cmakedefine ENABLE_CRASH_OVERRIDES -/* Define to disable C++ atexit */ -#cmakedefine DISABLE_LLVM_DYLIB_ATEXIT - /* Define if position independent code is enabled */ #cmakedefine ENABLE_PIC diff --git a/llvm/tools/llvm-shlib/libllvm.cpp b/llvm/tools/llvm-shlib/libllvm.cpp index 8424d660c9d0..40b4f66b0733 100644 --- a/llvm/tools/llvm-shlib/libllvm.cpp +++ b/llvm/tools/llvm-shlib/libllvm.cpp @@ -11,10 +11,3 @@ // you can't define a target with no sources. // //===----------------------------------------------------------------------===// - -#include "llvm/Config/config.h" - -#if defined(DISABLE_LLVM_DYLIB_ATEXIT) -extern "C" int __cxa_atexit(); -extern "C" int __cxa_atexit() { return 0; } -#endif