r366447 - [CMake] Don't set Python_ADDITIONAL_VERSIONS

Jonas Devlieghere via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 18 08:17:42 PDT 2019


Author: jdevlieghere
Date: Thu Jul 18 08:17:42 2019
New Revision: 366447

URL: http://llvm.org/viewvc/llvm-project?rev=366447&view=rev
Log:
[CMake] Don't set Python_ADDITIONAL_VERSIONS

Until recently, Python_ADDITIONAL_VERSIONS was used to limit LLVM's
Python support to 2.7. Now that both LLVM and LLDB both support Python
3, there's no longer a need to put an arbitrary limit on this.

However, instead of removing the variable, r365692 expanded the list,
which has the (presumably unintentional) side-effect of expression
preference for Python 3.

Instead, as Michal proposed in the original code review, we should just
not set the list at all, and let CMake pick whatever Python interpreter
you have in your path.

This patch removes the Python_ADDITIONAL_VERSIONS variable in llvm,
clang and lld. I've also updated the docs with the default behavior and
how to force a different Python version to be used.

Differential revision: https://reviews.llvm.org/D64894

Modified:
    cfe/trunk/CMakeLists.txt

Modified: cfe/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/CMakeLists.txt?rev=366447&r1=366446&r2=366447&view=diff
==============================================================================
--- cfe/trunk/CMakeLists.txt (original)
+++ cfe/trunk/CMakeLists.txt Thu Jul 18 08:17:42 2019
@@ -129,7 +129,6 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURR
   set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX} )
 
   if(LLVM_INCLUDE_TESTS)
-    set(Python_ADDITIONAL_VERSIONS 2.7)
     include(FindPythonInterp)
     if(NOT PYTHONINTERP_FOUND)
       message(FATAL_ERROR




More information about the cfe-commits mailing list