Execute llvm-lit with the python found by CMake by default

The check-* targets run ${Python3_EXECUTABLE} $BUILD/bin/llvm-lit, but
running `./bin/llvm-lit $ARGS` from the build directory currently always
uses "python" to run llvm-lit. On most systems this will be python2.7 even
if we found python3 at CMake time.

Reviewed By: compnerd

Differential Revision: https://reviews.llvm.org/D84625
This commit is contained in:
Alex Richardson 2020-08-03 10:51:14 +01:00
parent 03affa8099
commit d23b15cc16
2 changed files with 2 additions and 1 deletions

View file

@ -86,6 +86,7 @@ write_cmake_config("llvm-lit") {
values = [
"LLVM_SOURCE_DIR=" + rebase_path("//llvm", dir),
"Python3_EXECUTABLE=$python_path",
"BUILD_MODE=.",
"LLVM_LIT_CONFIG_MAP=" + config_map,
]

View file

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!@Python3_EXECUTABLE@
# -*- coding: utf-8 -*-
import os