mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-18 10:32:48 +02:00
[CMake] Require python 3.6 if enabling LLVM test targets
The lit test suite uses python 3.6 features. Rather than a strange python syntax error upon running the lit tests, we will require the correct version in CMake. Reviewed By: serge-sans-paille, yln Differential Revision: https://reviews.llvm.org/D95635
This commit is contained in:
parent
b807b27145
commit
909d35077f
@ -693,7 +693,8 @@ set(ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER TRUE CACHE BOOL
|
|||||||
|
|
||||||
include(HandleLLVMOptions)
|
include(HandleLLVMOptions)
|
||||||
|
|
||||||
find_package(Python3 REQUIRED COMPONENTS Interpreter)
|
find_package(Python3 ${LLVM_MINIMUM_PYTHON_VERSION} REQUIRED
|
||||||
|
COMPONENTS Interpreter)
|
||||||
|
|
||||||
######
|
######
|
||||||
|
|
||||||
|
@ -1176,3 +1176,11 @@ if(LLVM_USE_RELATIVE_PATHS_IN_FILES)
|
|||||||
append_if(SUPPORTS_FFILE_PREFIX_MAP "-ffile-prefix-map=${source_root}/=${LLVM_SOURCE_PREFIX}" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
|
append_if(SUPPORTS_FFILE_PREFIX_MAP "-ffile-prefix-map=${source_root}/=${LLVM_SOURCE_PREFIX}" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
|
||||||
add_flag_if_supported("-no-canonical-prefixes" NO_CANONICAL_PREFIXES)
|
add_flag_if_supported("-no-canonical-prefixes" NO_CANONICAL_PREFIXES)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(LLVM_INCLUDE_TESTS)
|
||||||
|
# Lit test suite requires at least python 3.6
|
||||||
|
set(LLVM_MINIMUM_PYTHON_VERSION 3.6)
|
||||||
|
else()
|
||||||
|
# FIXME: it is unknown if this is the actual minimum bound
|
||||||
|
set(LLVM_MINIMUM_PYTHON_VERSION 3.0)
|
||||||
|
endif()
|
||||||
|
Loading…
Reference in New Issue
Block a user