[PATCH] D78762: build: use `find_package(Python3)` if available

Saleem Abdulrasool via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 23 15:15:11 PDT 2020


compnerd created this revision.
compnerd added reviewers: smeenai, ldionne, beanz.
Herald added subscribers: dexonsmith, mgorny.
Herald added a project: LLVM.
compnerd updated this revision to Diff 259720.
compnerd retitled this revision from "build: use `find_package(Python2)` if available" to "build: use `find_package(Python3)` if available".
compnerd edited the summary of this revision.
compnerd added a comment.

After a discussion with @smeenai switch immediately to python3 as this may otherwise be treated as a regression for people on CMake>=3.12 and already using python3.  For those who are using older releases, the old behaviour is preserved with an alternate variable name being referenced.


This is primarily motivated by the desire to move from Python2 to
Python3.  `PYTHON_EXECUTABLE` is ambiguous.  This explicitly identifies
the python interpreter in use.  Since the LLVM build seems to be able to
completed successfully with python3, use that across the build.  The old
path aliases `PYTHON_EXECUTABLE` to be treated as Python3.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D78762

Files:
  llvm/CMakeLists.txt
  llvm/cmake/config-ix.cmake
  llvm/cmake/modules/AddLLVM.cmake
  llvm/test/lit.site.cfg.py.in

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78762.259720.patch
Type: text/x-patch
Size: 4912 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200423/6ea78053/attachment-0001.bin>


More information about the llvm-commits mailing list