llvm-6502/tools/llvm-shlib/libllvm.cpp
Chris Bieneman eaf5997921 Adding a new option to CMake to disable C++ atexit on llvm-shlib.
Summary:
This is desirable for WebKit and other clients of the llvm-shlib because C++ exit time destructors have a tendency to crash when invoked from multi-threaded applications.

Ideally this option will be temporary, because the ideal fix is to just not have exit time destructors.

Reviewers: chapuni, ributzka

Reviewed By: ributzka

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D6572

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223805 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-09 18:49:55 +00:00

21 lines
709 B
C++

//===-libllvm.cpp - LLVM Shared Library -----------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file is empty and serves only the purpose of making CMake happy because
// 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