]> granicus.if.org Git - clang/commitdiff
cmake: Fix install of libclang-cpp.so when LLVM_INSTALL_TOOLCHAIN_ONLY=ON
authorTom Stellard <tstellar@redhat.com>
Fri, 12 Jul 2019 15:11:28 +0000 (15:11 +0000)
committerTom Stellard <tstellar@redhat.com>
Fri, 12 Jul 2019 15:11:28 +0000 (15:11 +0000)
Summary:
If CLANG_LINK_CLANG_DYLIB is also enabled, then this library needs to be
installed.

Fixes PR42575.

Reviewers: beanz, smeenai

Subscribers: mgorny, cfe-commits

Tags: #clang

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

Conflicts:
clang/tools/clang-shlib/CMakeLists.txt

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@365905 91177308-0d34-0410-b5e6-96231b3b80d8

tools/clang-shlib/CMakeLists.txt

index 6f2e4f052e212b9a7249827eaa2555d209fa992c..1ba6ec74a93dd645ddef7712788d8ad993c9d50f 100644 (file)
@@ -38,8 +38,13 @@ foreach (lib ${clang_libs})
   list(APPEND _DEPS ${lib})
 endforeach ()
 
+if (CLANG_LINK_CLANG_DYLIB)
+  set(INSTALL_WITH_TOOLCHAIN INSTALL_WITH_TOOLCHAIN)
+endif()
+
 add_clang_library(clang-cpp
                   SHARED
+                  ${INSTALL_WITH_TOOLCHAIN}
                   clang-shlib.cpp
                   ${_OBJECTS}
                   LINK_LIBS