[debuginfo-tests] d0416b9 - Don't attempt to upgrade debug-info-tests to Python3.
Adrian Prantl via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 8 14:14:30 PST 2019
Author: Adrian Prantl
Date: 2019-11-08T14:14:12-08:00
New Revision: d0416b91f0390f6e69dacf3d5d076531221e0767
URL: https://github.com/llvm/llvm-project/commit/d0416b91f0390f6e69dacf3d5d076531221e0767
DIFF: https://github.com/llvm/llvm-project/commit/d0416b91f0390f6e69dacf3d5d076531221e0767.diff
LOG: 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.
Added:
Modified:
debuginfo-tests/CMakeLists.txt
Removed:
################################################################################
diff --git a/debuginfo-tests/CMakeLists.txt b/debuginfo-tests/CMakeLists.txt
index 025f468c48a6..36863e030b7f 100644
--- a/debuginfo-tests/CMakeLists.txt
+++ b/debuginfo-tests/CMakeLists.txt
@@ -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()
More information about the llvm-commits
mailing list