Skip to content

Commit d0416b9

Browse files
committed
Don't attempt to upgrade debug-info-tests to Python3.
There was CMake code that would attempt to detect Python 3 even if LLVM was configured with Python 2, but it messed with the environment for the other LLVM projects. This commit removes this functionality and just lkeaves a hard error if Python < 3 is detected and debuginfo-tests are required.
1 parent 2bbc4fd commit d0416b9

File tree

1 file changed

+0
-35
lines changed

1 file changed

+0
-35
lines changed

debuginfo-tests/CMakeLists.txt

-35
Original file line numberDiff line numberDiff line change
@@ -18,26 +18,6 @@ if (WIN32)
1818
set(DEBUGINFO_TEST_DEPS ${DEBUGINFO_TEST_DEPS} lld)
1919
endif()
2020

21-
# If we don't already have Python 3, throw away any previous results and try to
22-
# find it again.
23-
set(DEBUGINFO_UNSET_PYTHON3 OFF)
24-
if (PYTHON_VERSION_MAJOR LESS 3)
25-
unset(PYTHONINTERP_FOUND CACHE)
26-
unset(PYTHON_EXECUTABLE CACHE)
27-
unset(PYTHON_LIBRARY CACHE)
28-
unset(PYTHON_DLL CACHE)
29-
unset(PYTHON_INCLUDE_DIR CACHE)
30-
unset(PYTHON_VERSION_STRING CACHE)
31-
unset(PYTHON_VERSION_MAJOR CACHE)
32-
unset(PYTHON_VERSION_MINOR CACHE)
33-
unset(PYTHON_VERSION_PATCH CACHE)
34-
unset(PYTHONLIBS_VERSION_STRING CACHE)
35-
36-
# Try to find python3. If it doesn't exist, dexter tests can't run.
37-
find_package(PythonInterp "3")
38-
set(DEBUGINFO_UNSET_PYTHON3 ON)
39-
endif()
40-
4121
if (NOT DEFINED PYTHON_EXECUTABLE)
4222
message(FATAL_ERROR "Cannot run debuginfo-tests without python")
4323
elseif(PYTHON_VERSION_MAJOR LESS 3)
@@ -56,18 +36,3 @@ else()
5636
)
5737
set_target_properties(check-debuginfo PROPERTIES FOLDER "Debug info tests")
5838
endif()
59-
60-
# Prevent the rest of llvm observing our secret python3-ness, if that wasn't
61-
# what was originally found.
62-
if (DEBUGINFO_UNSET_PYTHON3)
63-
unset(PYTHONINTERP_FOUND CACHE)
64-
unset(PYTHON_EXECUTABLE CACHE)
65-
unset(PYTHON_LIBRARY CACHE)
66-
unset(PYTHON_DLL CACHE)
67-
unset(PYTHON_INCLUDE_DIR CACHE)
68-
unset(PYTHON_VERSION_STRING CACHE)
69-
unset(PYTHON_VERSION_MAJOR CACHE)
70-
unset(PYTHON_VERSION_MINOR CACHE)
71-
unset(PYTHON_VERSION_PATCH CACHE)
72-
unset(PYTHONLIBS_VERSION_STRING CACHE)
73-
endif()

0 commit comments

Comments
 (0)