This drops the use of deprecated CMake modules to find python.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
LLVM already relies on find_package(Python3). Prior to the patch different Python versions are found on a system with multiple versions installed (here 3.9 and 3.7):
-- Found Python3: /usr/bin/python3.9 (found version "3.9.0") found components: Interpreter -- Constructing LLVMBuild project information -- Linker detection: LLD -- Found Git: /usr/bin/git (found version "2.26.2") -- Targeting X86 -- Performing Test C_SUPPORTS_WERROR_IMPLICIT_FUNCTION_DECLARATION -- Performing Test C_SUPPORTS_WERROR_IMPLICIT_FUNCTION_DECLARATION - Success -- Found PythonInterp: /usr/bin/python (found version "3.7.9") -- Found PythonLibs: /usr/lib64/libpython3.7m.so (found version "3.7.9") -- Found python include dirs: /usr/include/python3.7m -- Found python libraries: /usr/lib64/libpython3.7m.so -- Found PythonLibs: /usr/lib64/libpython3.7m.so -- Found pybind11 v2.5.0: /usr/include;/usr/include;/usr/include/python3.7m -- Python prefix = '', suffix = '', extension = '.cpython-37m-x86_64-linux-gnu.so
This is fixed with the proposed patch:
-- Found Python3: /usr/bin/python3.9 (found version "3.9.0") found components: Interpreter -- Constructing LLVMBuild project information -- Linker detection: LLD -- Found Git: /usr/bin/git (found version "2.26.2") -- Targeting X86 -- Performing Test C_SUPPORTS_WERROR_IMPLICIT_FUNCTION_DECLARATION -- Performing Test C_SUPPORTS_WERROR_IMPLICIT_FUNCTION_DECLARATION - Success -- Found Python3: /usr/bin/python3.9 (found version "3.9.0") found components: Interpreter Development -- Found python include dirs: /usr/include/python3.9 -- Found python libraries: /usr/lib64/libpython3.9.so -- Found PythonInterp: /usr/bin/python3.9 (found version "3.9") -- Found PythonLibs: /usr/lib64/libpython3.9.so -- Found pybind11 v2.5.0: /usr/include;/usr/include;/usr/include/python3.9 -- Python prefix = '', suffix = '', extension = '.cpython-39-x86_64-linux-gnu.so