[PATCH] D42331: [cmake] Remove LLVM_HAVE_OPT_VIEWER_MODULES from LLVMConfig

Michał Górny via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 20 01:59:09 PST 2018


mgorny created this revision.
mgorny added reviewers: anemet, beanz.

Remove the LLVM_HAVE_OPT_VIEWER_MODULES definition from LLVMConfig.
It is not used by any LLVM packages, and it really does not provide
a stable information that other packages could rely on.

Given that opt-viewer is written in Python and installed
unconditionally, there is no strict necessity for the relevant Python
modules to be installed before building LLVM. In particular,
if the missing Python modules are installed after installing LLVM
with opt-viewer, the LLVMConfig module would wrongly suggest that
opt-viewer does not work.

If any package does need to check if opt-viewer has the necessary
dependencies installed, it should manually recheck them at the moment
of execution. If at all, LLVM CMake files may provide macros to help
with that but not a static value.


https://reviews.llvm.org/D42331

Files:
  cmake/modules/LLVMConfig.cmake.in


Index: cmake/modules/LLVMConfig.cmake.in
===================================================================
--- cmake/modules/LLVMConfig.cmake.in
+++ cmake/modules/LLVMConfig.cmake.in
@@ -74,7 +74,6 @@
 set(LLVM_BINARY_DIR "@LLVM_CONFIG_BINARY_DIR@")
 set(LLVM_TOOLS_BINARY_DIR "@LLVM_CONFIG_TOOLS_BINARY_DIR@")
 set(LLVM_TOOLS_INSTALL_DIR "@LLVM_TOOLS_INSTALL_DIR@")
-set(LLVM_HAVE_OPT_VIEWER_MODULES @LLVM_HAVE_OPT_VIEWER_MODULES@)
 
 if(NOT TARGET LLVMSupport)
   set(LLVM_EXPORTED_TARGETS "@LLVM_CONFIG_EXPORTS@")


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42331.130754.patch
Type: text/x-patch
Size: 519 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180120/83e9852a/attachment.bin>


More information about the llvm-commits mailing list