[PATCH] D64225: [cmake] Don't set install rules for tblgen if building utils is disabled
Keno Fischer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 4 16:42:23 PDT 2019
loladiro created this revision.
loladiro added a reviewer: smeenai.
Herald added subscribers: llvm-commits, mgorny.
Herald added a project: LLVM.
This is a follow up to D64032 <https://reviews.llvm.org/D64032>. Afterwards if building utils is disabled
and cross compilation is attempted, CMake will complain that adding
`install()` directives to targets with EXCLUDE_FROM_ALL set is "undefined".
Indeed, it appears depending on the CMake version and the selected
Generator, the install rule will error because the underlying target isn't
built. Fix that by not adding the install rule if building utils is not
requested. Note that this doesn't prevent building tblgen as a
dependency in not cross-build, even if building tools is disabled.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D64225
Files:
llvm/cmake/modules/TableGen.cmake
Index: llvm/cmake/modules/TableGen.cmake
===================================================================
--- llvm/cmake/modules/TableGen.cmake
+++ llvm/cmake/modules/TableGen.cmake
@@ -147,7 +147,7 @@
endif()
endif()
- if (${project} STREQUAL LLVM AND NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+ if (${project} STREQUAL LLVM AND NOT LLVM_INSTALL_TOOLCHAIN_ONLY AND LLVM_BUILD_UTILS)
set(export_to_llvmexports)
if(${target} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR
NOT LLVM_DISTRIBUTION_COMPONENTS)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64225.208092.patch
Type: text/x-patch
Size: 523 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190704/56c81486/attachment.bin>
More information about the llvm-commits
mailing list