[lld] r327126 - [CMake] Properly conditionalize installation of lld libraries

David Zarzycki via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 9 05:09:37 PST 2018


Author: davezarzycki
Date: Fri Mar  9 05:09:36 2018
New Revision: 327126

URL: http://llvm.org/viewvc/llvm-project?rev=327126&view=rev
Log:
[CMake] Properly conditionalize installation of lld libraries

In what appears to be a copy-and-paste error, lld currently only
installs libraries if the lld tools are configured to build.

Instead, lld should allow the libraries to be installed even if the lld
tools are not being built. Additionally, if users want to only install
the tools and not the libraries, the LLVM way of doing that is by
checking for LLVM_INSTALL_TOOLCHAIN_ONLY.

This fixes PR35960.

Modified:
    lld/trunk/cmake/modules/AddLLD.cmake

Modified: lld/trunk/cmake/modules/AddLLD.cmake
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/cmake/modules/AddLLD.cmake?rev=327126&r1=327125&r2=327126&view=diff
==============================================================================
--- lld/trunk/cmake/modules/AddLLD.cmake (original)
+++ lld/trunk/cmake/modules/AddLLD.cmake Fri Mar  9 05:09:36 2018
@@ -10,7 +10,7 @@ macro(add_lld_library name)
   llvm_add_library(${name} ${ARG_ENABLE_SHARED} ${ARG_UNPARSED_ARGUMENTS})
   set_target_properties(${name} PROPERTIES FOLDER "lld libraries")
 
-  if (LLD_BUILD_TOOLS)
+  if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
     if(${name} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR
         NOT LLVM_DISTRIBUTION_COMPONENTS)
       set(export_to_lldtargets EXPORT lldTargets)




More information about the llvm-commits mailing list