Adding llvm-shlib to CMake build system with a few new bells and whistles
authorChris Bieneman <beanz@apple.com>
Thu, 23 Oct 2014 17:22:14 +0000 (17:22 +0000)
committerChris Bieneman <beanz@apple.com>
Thu, 23 Oct 2014 17:22:14 +0000 (17:22 +0000)
commit71926e73ba99c07a02671b9001197cedc06f8905
treef44148d916942abe7d97d5affef1540c04c3f3a8
parent3d716782834cc2b5c5a5d11ae38338791d150c61
Adding llvm-shlib to CMake build system with a few new bells and whistles

Summary:
This patch adds a new CMake build setting LLVM_BUILD_LLVM_DYLIB, which defaults to OFF. When set to ON, this will generate a shared library containing most of LLVM. The contents of the shared library can be overriden by specifying LLVM_DYLIB_COMPONENTS. LLVM_DYLIB_COMPONENTS can be set to a semi-colon delimited list of any LLVM components that you llvm-config can resolve.

On Windows, unless you are using Cygwin, you must specify an explicit symbol export file using LLVM_EXPORTED_SYMBOL_FILE. On Cygwin and all unix-like platforms if you do not specify LLVM_EXPORTED_SYMBOL_FILE, an export file containing only the LLVM C API will be auto-generated from the list of LLVM components specified in LLVM_DYLIB_COMPONENTS.

Reviewers: rnk

Reviewed By: rnk

Subscribers: rnk, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220490 91177308-0d34-0410-b5e6-96231b3b80d8
CMakeLists.txt
tools/CMakeLists.txt
tools/llvm-shlib/CMakeLists.txt [new file with mode: 0644]
tools/llvm-shlib/libllvm.cpp [new file with mode: 0644]