1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00

llvm-shlib: Remove the option to override __cxa_atexit

If anybody is actually using this, it probably doesn't do what they
think it does. This actually causes the dylib to *export* a
__cxa_atexit symbol, so anything that links it probably loses their
exit time destructors as well as disabling LLVM's.

This just removes the option entirely. If somebody does need this
behaviour we should figure out a more principled way to do it.

This is effectively a revert of r223805.

llvm-svn: 263498
This commit is contained in:
Justin Bogner 2016-03-14 21:54:45 +00:00
parent 475799d8b4
commit 57ad3995ac
3 changed files with 1 additions and 19 deletions

View File

@ -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))

View File

@ -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

View File

@ -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