[llvm-branch-commits] [llvm-branch] r369899 - Merging r366447:

Hans Wennborg via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Aug 26 05:31:37 PDT 2019


Author: hans
Date: Mon Aug 26 05:31:37 2019
New Revision: 369899

URL: http://llvm.org/viewvc/llvm-project?rev=369899&view=rev
Log:
Merging r366447:
------------------------------------------------------------------------
r366447 | jdevlieghere | 2019-07-18 17:17:42 +0200 (Thu, 18 Jul 2019) | 19 lines

[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:
    llvm/branches/release_90/   (props changed)
    llvm/branches/release_90/CMakeLists.txt
    llvm/branches/release_90/docs/GettingStarted.rst

Propchange: llvm/branches/release_90/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Aug 26 05:31:37 2019
@@ -1,3 +1,3 @@
 /llvm/branches/Apple/Pertwee:110850,110961
 /llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,366431,366481,366487,366527,366570,366660,366868,366925,367019,367030,367062,367084,367124,367215,367292,367304,367306,367314,367340-367341,367394,367396,367398,367403,367412,367417,367429,367580,367662,367750,367753,367846-367847,367898,367941,368004,368230,368300,368315,368324,368477-368478,368517-368519,368554,368572,368873,369011,369026,369084,369095,369097,369168,369199,369426,369443
+/llvm/trunk:155241,366431,366447,366481,366487,366527,366570,366660,366868,366925,367019,367030,367062,367084,367124,367215,367292,367304,367306,367314,367340-367341,367394,367396,367398,367403,367412,367417,367429,367580,367662,367750,367753,367846-367847,367898,367941,368004,368230,368300,368315,368324,368477-368478,368517-368519,368554,368572,368873,369011,369026,369084,369095,369097,369168,369199,369426,369443

Modified: llvm/branches/release_90/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_90/CMakeLists.txt?rev=369899&r1=369898&r2=369899&view=diff
==============================================================================
--- llvm/branches/release_90/CMakeLists.txt (original)
+++ llvm/branches/release_90/CMakeLists.txt Mon Aug 26 05:31:37 2019
@@ -642,8 +642,6 @@ option(LLVM_ENABLE_PLUGINS "Enable plugi
 
 include(HandleLLVMOptions)
 
-# We support both Python 2 and 3.
-set(Python_ADDITIONAL_VERSIONS 3.7 3.6 3.5 2.7)
 include(FindPythonInterp)
 if( NOT PYTHONINTERP_FOUND )
   message(FATAL_ERROR

Modified: llvm/branches/release_90/docs/GettingStarted.rst
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_90/docs/GettingStarted.rst?rev=369899&r1=369898&r2=369899&view=diff
==============================================================================
--- llvm/branches/release_90/docs/GettingStarted.rst (original)
+++ llvm/branches/release_90/docs/GettingStarted.rst Mon Aug 26 05:31:37 2019
@@ -598,6 +598,11 @@ used by people developing LLVM.
 | CMAKE_INSTALL_PREFIX    | Specifies the install directory to target when     |
 |                         | running the install action of the build files.     |
 +-------------------------+----------------------------------------------------+
+| PYTHON_EXECUTABLE       | Forces CMake to use a specific Python version by   |
+|                         | passing a path to a Python interpreter. By default |
+|                         | the Python version of the interpreter in your PATH |
+|                         | is used.                                           |
++-------------------------+----------------------------------------------------+
 | LLVM_TARGETS_TO_BUILD   | A semicolon delimited list controlling which       |
 |                         | targets will be built and linked into llvm.        |
 |                         | The default list is defined as                     |




More information about the llvm-branch-commits mailing list