File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -138,6 +138,10 @@ if(NOT "${FOUND_INDEX}" STREQUAL "-1")
138138 list (REMOVE_ITEM LLVM_ENABLE_PROJECTS "pstl" )
139139endif ()
140140
141+ foreach (proj ${LLVM_DISABLE_PROJECTS} )
142+ list (REMOVE_ITEM LLVM_ENABLE_PROJECTS "${proj} " )
143+ endforeach ()
144+
141145foreach (proj ${LLVM_ENABLE_PROJECTS} )
142146 if (NOT proj STREQUAL "llvm" AND NOT "${proj} " IN_LIST LLVM_KNOWN_PROJECTS)
143147 MESSAGE (FATAL_ERROR "${proj} isn't a known project: ${LLVM_KNOWN_PROJECTS} . Did you mean to enable it as a runtime in LLVM_ENABLE_RUNTIMES?" )
@@ -666,7 +670,7 @@ if(LLVM_EXPERIMENTAL_TARGETS_TO_BUILD STREQUAL "all")
666670 set (LLVM_EXPERIMENTAL_TARGETS_TO_BUILD ${LLVM_ALL_EXPERIMENTAL_TARGETS} )
667671endif ()
668672
669- if ("flang" IN_LIST LLVM_ENABLE_PROJECTS AND
673+ if ("flang" IN_LIST LLVM_ENABLE_PROJECTS AND
670674 "AArch64" IN_LIST LLVM_TARGETS_TO_BUILD AND
671675 NOT ("compiler-rt" IN_LIST LLVM_ENABLE_RUNTIMES OR "compiler-rt" IN_LIST LLVM_ENABLE_PROJECTS))
672676 message (STATUS "Enabling compiler-rt as a dependency of Flang" )
Original file line number Diff line number Diff line change @@ -435,6 +435,14 @@ its enabled sub-projects. Nearly all of these variable names begin with
435435 of the machine where LLVM is being built. If you are building a cross-compiler,
436436 set it to the target triple of your desired architecture.
437437
438+ **LLVM_DISABLE_PROJECTS **:STRING
439+ Semicolon-separated list of projects to exclude from the build. Sometimes it is
440+ more convenient to exclude a few projects than to have to enumerate all other
441+ projects. This flag can be combined with ``LLVM_ENABLE_PROJECTS `` to easily
442+ select projects of interest in the build. For example, the command:
443+ ``cmake ... -DLLVM_ENABLE_PROJECTS=all -DLLVM_DISABLE_PROJECTS=libclc ... ``
444+ allows to build all projects but ``libclc ``.
445+
438446**LLVM_DOXYGEN_QCH_FILENAME **:STRING
439447 The filename of the Qt Compressed Help file that will be generated when
440448 ``-DLLVM_ENABLE_DOXYGEN=ON `` and
You can’t perform that action at this time.
0 commit comments