[clang] 0703b07 - [CMake] Actually require python 3.6 or greater
Christopher Tetreault via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 29 11:47:40 PST 2021
Author: Christopher Tetreault
Date: 2021-01-29T11:47:21-08:00
New Revision: 0703b0753c40dad30f1683403f6600bd2cb42055
URL: https://github.com/llvm/llvm-project/commit/0703b0753c40dad30f1683403f6600bd2cb42055
DIFF: https://github.com/llvm/llvm-project/commit/0703b0753c40dad30f1683403f6600bd2cb42055.diff
LOG: [CMake] Actually require python 3.6 or greater
Previously, CMake would find any version of Python3. However, the project
claims to require 3.6 or greater, and 3.6 features are being used.
Reviewed By: yln
Differential Revision: https://reviews.llvm.org/D95635
Added:
Modified:
clang/CMakeLists.txt
lld/CMakeLists.txt
llvm/CMakeLists.txt
mlir/CMakeLists.txt
Removed:
################################################################################
diff --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt
index 9e74014134a0..466b92ba6143 100644
--- a/clang/CMakeLists.txt
+++ b/clang/CMakeLists.txt
@@ -131,7 +131,7 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX} )
if(LLVM_INCLUDE_TESTS)
- find_package(Python3 REQUIRED COMPONENTS Interpreter)
+ find_package(Python3 3.6 REQUIRED COMPONENTS Interpreter)
# Check prebuilt llvm/utils.
if(EXISTS ${LLVM_TOOLS_BINARY_DIR}/FileCheck${CMAKE_EXECUTABLE_SUFFIX}
diff --git a/lld/CMakeLists.txt b/lld/CMakeLists.txt
index d4e561b50d8f..4923361a9969 100644
--- a/lld/CMakeLists.txt
+++ b/lld/CMakeLists.txt
@@ -57,7 +57,7 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
include(CheckAtomic)
if(LLVM_INCLUDE_TESTS)
- find_package(Python3 REQUIRED COMPONENTS Interpreter)
+ find_package(Python3 3.6 REQUIRED COMPONENTS Interpreter)
# Check prebuilt llvm/utils.
if(EXISTS ${LLVM_TOOLS_BINARY_DIR}/FileCheck${CMAKE_EXECUTABLE_SUFFIX}
diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index 40be7a855932..f0cb42b77c64 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -697,7 +697,7 @@ set(ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER FALSE CACHE BOOL
include(HandleLLVMOptions)
-find_package(Python3 REQUIRED COMPONENTS Interpreter)
+find_package(Python3 3.6 REQUIRED COMPONENTS Interpreter)
######
diff --git a/mlir/CMakeLists.txt b/mlir/CMakeLists.txt
index cbae5fd54823..b2eec04520c9 100644
--- a/mlir/CMakeLists.txt
+++ b/mlir/CMakeLists.txt
@@ -79,7 +79,7 @@ set(MLIR_PYTHON_BINDINGS_VERSION_LOCKED 1 CACHE BOOL
if(MLIR_BINDINGS_PYTHON_ENABLED)
include(MLIRDetectPythonEnv)
- find_package(Python3 COMPONENTS Interpreter Development NumPy REQUIRED)
+ find_package(Python3 3.6 COMPONENTS Interpreter Development NumPy REQUIRED)
message(STATUS "Found python include dirs: ${Python3_INCLUDE_DIRS}")
message(STATUS "Found python libraries: ${Python3_LIBRARIES}")
message(STATUS "Found numpy v${Python3_NumPy_VERSION}: ${Python3_NumPy_INCLUDE_DIRS}")
More information about the cfe-commits
mailing list