forked from OSchip/llvm-project
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.
This commit is contained in:
parent
2bbc4fdd8f
commit
d0416b91f0
|
@ -18,26 +18,6 @@ if (WIN32)
|
|||
set(DEBUGINFO_TEST_DEPS ${DEBUGINFO_TEST_DEPS} lld)
|
||||
endif()
|
||||
|
||||
# If we don't already have Python 3, throw away any previous results and try to
|
||||
# find it again.
|
||||
set(DEBUGINFO_UNSET_PYTHON3 OFF)
|
||||
if (PYTHON_VERSION_MAJOR LESS 3)
|
||||
unset(PYTHONINTERP_FOUND CACHE)
|
||||
unset(PYTHON_EXECUTABLE CACHE)
|
||||
unset(PYTHON_LIBRARY CACHE)
|
||||
unset(PYTHON_DLL CACHE)
|
||||
unset(PYTHON_INCLUDE_DIR CACHE)
|
||||
unset(PYTHON_VERSION_STRING CACHE)
|
||||
unset(PYTHON_VERSION_MAJOR CACHE)
|
||||
unset(PYTHON_VERSION_MINOR CACHE)
|
||||
unset(PYTHON_VERSION_PATCH CACHE)
|
||||
unset(PYTHONLIBS_VERSION_STRING CACHE)
|
||||
|
||||
# Try to find python3. If it doesn't exist, dexter tests can't run.
|
||||
find_package(PythonInterp "3")
|
||||
set(DEBUGINFO_UNSET_PYTHON3 ON)
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED PYTHON_EXECUTABLE)
|
||||
message(FATAL_ERROR "Cannot run debuginfo-tests without python")
|
||||
elseif(PYTHON_VERSION_MAJOR LESS 3)
|
||||
|
@ -56,18 +36,3 @@ else()
|
|||
)
|
||||
set_target_properties(check-debuginfo PROPERTIES FOLDER "Debug info tests")
|
||||
endif()
|
||||
|
||||
# Prevent the rest of llvm observing our secret python3-ness, if that wasn't
|
||||
# what was originally found.
|
||||
if (DEBUGINFO_UNSET_PYTHON3)
|
||||
unset(PYTHONINTERP_FOUND CACHE)
|
||||
unset(PYTHON_EXECUTABLE CACHE)
|
||||
unset(PYTHON_LIBRARY CACHE)
|
||||
unset(PYTHON_DLL CACHE)
|
||||
unset(PYTHON_INCLUDE_DIR CACHE)
|
||||
unset(PYTHON_VERSION_STRING CACHE)
|
||||
unset(PYTHON_VERSION_MAJOR CACHE)
|
||||
unset(PYTHON_VERSION_MINOR CACHE)
|
||||
unset(PYTHON_VERSION_PATCH CACHE)
|
||||
unset(PYTHONLIBS_VERSION_STRING CACHE)
|
||||
endif()
|
||||
|
|
Loading…
Reference in New Issue