Skip to content

Conversation

kraj
Copy link
Contributor

@kraj kraj commented Aug 3, 2025

… from the CMake

Check right before setting LLVM_HAVE_OPT_VIEWER_MODULES so that if the user specifies the variable on the commandline it takes precedence. If not, fall back to the old logic

@llvmbot llvmbot added the cmake Build system in general and CMake in particular label Aug 3, 2025
@rossburton
Copy link
Contributor

Note that the opt-viewer script is always installed anyway, even if the dependencies are not present. I'd say the same variable should be used to seed whether opt-viewer is installed or not.

…he CMake

Check right before setting LLVM_HAVE_OPT_VIEWER_MODULES
so that if the user specifies the variable on the commandline
it takes precedence. If not, fall back to the old logic

Do not install opt-viewer of the modules are not found. Since the python
scripts have dependencies on these modules, it makes not much point to
have them installed.
@kraj kraj force-pushed the kraj/opt-viewer branch from 6856481 to 431d4ea Compare August 5, 2025 16:05
@rossburton
Copy link
Contributor

I know that LLVM currently has all the detection logic embedded in AddLLVM.cmake, is that by design or just how it's happened? It feels like it could be moved into llvm/tools/opt-viewer/CMakeLists.txt which would then also automatically not run if LLVM_TOOL_OPT_VIEWER_BUILD was OFF.

kraj added a commit to kraj/llvm-project that referenced this pull request Sep 4, 2025
… from the CMake

Check right before setting LLVM_HAVE_OPT_VIEWER_MODULES
so that if the user specifies the variable on the commandline
it takes precedence. If not, fall back to the old logic

Upstream-Status: Submitted [llvm#151845]
Signed-off-by: Khem Raj <[email protected]>
kraj added a commit to kraj/llvm-project that referenced this pull request Sep 4, 2025
…he CMake

Check right before setting LLVM_HAVE_OPT_VIEWER_MODULES
so that if the user specifies the variable on the commandline
it takes precedence. If not, fall back to the old logic

Upstream-Status: Submitted [llvm#151845]

Signed-off-by: Khem Raj <[email protected]>
kraj added a commit to kraj/llvm-project that referenced this pull request Sep 8, 2025
…he CMake

Check right before setting LLVM_HAVE_OPT_VIEWER_MODULES
so that if the user specifies the variable on the commandline
it takes precedence. If not, fall back to the old logic

Upstream-Status: Submitted [llvm#151845]

Signed-off-by: Khem Raj <[email protected]>
kraj added a commit to kraj/llvm-project that referenced this pull request Sep 10, 2025
…he CMake

Check right before setting LLVM_HAVE_OPT_VIEWER_MODULES
so that if the user specifies the variable on the commandline
it takes precedence. If not, fall back to the old logic

Upstream-Status: Submitted [llvm#151845]

Signed-off-by: Khem Raj <[email protected]>
kraj added a commit to kraj/llvm-project that referenced this pull request Sep 13, 2025
… from the CMake

Check right before setting LLVM_HAVE_OPT_VIEWER_MODULES
so that if the user specifies the variable on the commandline
it takes precedence. If not, fall back to the old logic

Upstream-Status: Submitted [llvm#151845]
Signed-off-by: Khem Raj <[email protected]>
kraj added a commit to kraj/llvm-project that referenced this pull request Sep 13, 2025
…he CMake

Check right before setting LLVM_HAVE_OPT_VIEWER_MODULES
so that if the user specifies the variable on the commandline
it takes precedence. If not, fall back to the old logic

Upstream-Status: Submitted [llvm#151845]

Signed-off-by: Khem Raj <[email protected]>
kraj added a commit to kraj/llvm-project that referenced this pull request Sep 13, 2025
…he CMake

Check right before setting LLVM_HAVE_OPT_VIEWER_MODULES
so that if the user specifies the variable on the commandline
it takes precedence. If not, fall back to the old logic

Upstream-Status: Submitted [llvm#151845]

Signed-off-by: Khem Raj <[email protected]>
kraj added a commit to kraj/llvm-project that referenced this pull request Sep 18, 2025
… from the CMake

Check right before setting LLVM_HAVE_OPT_VIEWER_MODULES
so that if the user specifies the variable on the commandline
it takes precedence. If not, fall back to the old logic

Upstream-Status: Submitted [llvm#151845]
Signed-off-by: Khem Raj <[email protected]>
kraj added a commit to kraj/llvm-project that referenced this pull request Sep 18, 2025
…he CMake

Check right before setting LLVM_HAVE_OPT_VIEWER_MODULES
so that if the user specifies the variable on the commandline
it takes precedence. If not, fall back to the old logic

Upstream-Status: Submitted [llvm#151845]

Signed-off-by: Khem Raj <[email protected]>
kraj added a commit to kraj/llvm-project that referenced this pull request Sep 18, 2025
…he CMake

Check right before setting LLVM_HAVE_OPT_VIEWER_MODULES
so that if the user specifies the variable on the commandline
it takes precedence. If not, fall back to the old logic

Upstream-Status: Submitted [llvm#151845]

Signed-off-by: Khem Raj <[email protected]>
kraj added a commit to kraj/llvm-project that referenced this pull request Sep 19, 2025
…he CMake

Check right before setting LLVM_HAVE_OPT_VIEWER_MODULES
so that if the user specifies the variable on the commandline
it takes precedence. If not, fall back to the old logic

Upstream-Status: Submitted [llvm#151845]

Signed-off-by: Khem Raj <[email protected]>
kraj added a commit to kraj/llvm-project that referenced this pull request Sep 23, 2025
… from the CMake

Check right before setting LLVM_HAVE_OPT_VIEWER_MODULES
so that if the user specifies the variable on the commandline
it takes precedence. If not, fall back to the old logic

Upstream-Status: Submitted [llvm#151845]
Signed-off-by: Khem Raj <[email protected]>
kraj added a commit to kraj/llvm-project that referenced this pull request Sep 23, 2025
…he CMake

Check right before setting LLVM_HAVE_OPT_VIEWER_MODULES
so that if the user specifies the variable on the commandline
it takes precedence. If not, fall back to the old logic

Upstream-Status: Submitted [llvm#151845]

Signed-off-by: Khem Raj <[email protected]>
kraj added a commit to kraj/llvm-project that referenced this pull request Sep 24, 2025
… from the CMake

Check right before setting LLVM_HAVE_OPT_VIEWER_MODULES
so that if the user specifies the variable on the commandline
it takes precedence. If not, fall back to the old logic

Upstream-Status: Submitted [llvm#151845]
Signed-off-by: Khem Raj <[email protected]>
kraj added a commit to kraj/llvm-project that referenced this pull request Sep 24, 2025
…he CMake

Check right before setting LLVM_HAVE_OPT_VIEWER_MODULES
so that if the user specifies the variable on the commandline
it takes precedence. If not, fall back to the old logic

Upstream-Status: Submitted [llvm#151845]

Signed-off-by: Khem Raj <[email protected]>
kraj added a commit to kraj/llvm-project that referenced this pull request Sep 24, 2025
…he CMake

Check right before setting LLVM_HAVE_OPT_VIEWER_MODULES
so that if the user specifies the variable on the commandline
it takes precedence. If not, fall back to the old logic

Upstream-Status: Submitted [llvm#151845]

Signed-off-by: Khem Raj <[email protected]>
kraj added a commit to kraj/llvm-project that referenced this pull request Sep 24, 2025
…he CMake

Check right before setting LLVM_HAVE_OPT_VIEWER_MODULES
so that if the user specifies the variable on the commandline
it takes precedence. If not, fall back to the old logic

Upstream-Status: Submitted [llvm#151845]

Signed-off-by: Khem Raj <[email protected]>
kraj added a commit to kraj/llvm-project that referenced this pull request Sep 25, 2025
…he CMake

Check right before setting LLVM_HAVE_OPT_VIEWER_MODULES
so that if the user specifies the variable on the commandline
it takes precedence. If not, fall back to the old logic

Upstream-Status: Submitted [llvm#151845]

Signed-off-by: Khem Raj <[email protected]>
kraj added a commit to kraj/llvm-project that referenced this pull request Sep 25, 2025
…he CMake

Check right before setting LLVM_HAVE_OPT_VIEWER_MODULES
so that if the user specifies the variable on the commandline
it takes precedence. If not, fall back to the old logic

Upstream-Status: Submitted [llvm#151845]

Signed-off-by: Khem Raj <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmake Build system in general and CMake in particular
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants