This is an archive of the discontinued LLVM Phabricator instance.

[cmake] Remove LLVM_HAVE_OPT_VIEWER_MODULES from LLVMConfig
AbandonedPublic

Authored by mgorny on Jan 20 2018, 1:59 AM.

Details

Reviewers
anemet
beanz
Summary

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.

Diff Detail

Event Timeline

mgorny created this revision.Jan 20 2018, 1:59 AM
anemet requested changes to this revision.Jan 20 2018, 9:30 AM

This is used by Swift. Providing a macro instead of a static value may be a better solution. If you are willing to do that I am OK with that but I have a strong objection against simply removing this.

This revision now requires changes to proceed.Jan 20 2018, 9:30 AM
mgorny abandoned this revision.Dec 28 2018, 8:00 AM