Skip to content

Commit 96962d5

Browse files
committed
[clang] set python3 as required build dependency
The required HTMLLogger include file needs python3 to run resource_bundle.py to bundle all the html/css/js resources. However, if user sets -DLLVM_INCLUDE_TESTS=OFF, CMake will not find python3 and the resource bundler will never be executed. This patch set the python3 as a required build dependency to fix this problem. Patch By: Avimitin Differential Revision: https://reviews.llvm.org/D152418
1 parent 2c44168 commit 96962d5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

clang/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,10 @@ if(CLANG_BUILT_STANDALONE)
8282
set( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX} )
8383
set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX} )
8484

85-
if(LLVM_INCLUDE_TESTS)
86-
find_package(Python3 ${LLVM_MINIMUM_PYTHON_VERSION} REQUIRED
87-
COMPONENTS Interpreter)
85+
find_package(Python3 ${LLVM_MINIMUM_PYTHON_VERSION} REQUIRED
86+
COMPONENTS Interpreter)
8887

88+
if(LLVM_INCLUDE_TESTS)
8989
# Check prebuilt llvm/utils.
9090
if(EXISTS ${LLVM_TOOLS_BINARY_DIR}/FileCheck${CMAKE_EXECUTABLE_SUFFIX}
9191
AND EXISTS ${LLVM_TOOLS_BINARY_DIR}/count${CMAKE_EXECUTABLE_SUFFIX}

0 commit comments

Comments
 (0)