]> granicus.if.org Git - clang/commit
Add Clang shared library with C++ exports
authorChris Bieneman <chris.bieneman@me.com>
Thu, 16 May 2019 22:06:07 +0000 (22:06 +0000)
committerChris Bieneman <chris.bieneman@me.com>
Thu, 16 May 2019 22:06:07 +0000 (22:06 +0000)
commit5b9ebf3d7d072f39ed63007643c75fcc4ed5ffa7
tree69fd049439814be0189165f66f213fab5ac323c7
parent25284eec9e11c1808306e57a76d3e2eaa90fc5af
Add Clang shared library with C++ exports

Summary:
This patch adds a libClang_shared library on *nix systems which exports the entire C++ API. In order to support this on Windows we should really refactor llvm-shlib and share code between the two.

This also uses a slightly different method for generating the shared library, which I should back-port to llvm-shlib. Instead of linking the static archives and passing linker flags to force loading the whole libraries, this patch creates object libraries for every library (which has no cost in the build system), and link the object libraries.

Reviewers: tstellar, winksaville

Subscribers: mgorny, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D61909

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