Drop all uses of python2 from lit tests
This commit is contained in:
parent
2167c29b6c
commit
faa3d2dca7
27
0001-CMake-Don-t-prefer-python2.7.patch
Normal file
27
0001-CMake-Don-t-prefer-python2.7.patch
Normal file
@ -0,0 +1,27 @@
|
||||
From 1e0f1c5481a96d760f7840d4dde103353a0131f8 Mon Sep 17 00:00:00 2001
|
||||
From: Tom Stellard <tstellar@redhat.com>
|
||||
Date: Thu, 30 Aug 2018 11:38:51 -0700
|
||||
Subject: [PATCH] CMake: Don't prefer python2.7
|
||||
|
||||
---
|
||||
CMakeLists.txt | 4 ----
|
||||
1 file changed, 4 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 31df640..2603f1c 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -613,10 +613,6 @@ message(STATUS "LLVM default target triple: ${LLVM_DEFAULT_TARGET_TRIPLE}")
|
||||
|
||||
include(HandleLLVMOptions)
|
||||
|
||||
-# Verify that we can find a Python 2 interpreter. Python 3 is unsupported.
|
||||
-# FIXME: We should support systems with only Python 3, but that requires work
|
||||
-# on LLDB.
|
||||
-set(Python_ADDITIONAL_VERSIONS 2.7)
|
||||
include(FindPythonInterp)
|
||||
if( NOT PYTHONINTERP_FOUND )
|
||||
message(FATAL_ERROR
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -0,0 +1,27 @@
|
||||
From 3235c2488c3cd661b4421cc3e4739baefdc80783 Mon Sep 17 00:00:00 2001
|
||||
From: Tom Stellard <tstellar@redhat.com>
|
||||
Date: Thu, 30 Aug 2018 12:53:56 -0700
|
||||
Subject: [PATCH] lit: Use sys.executable for executing builtin commands
|
||||
|
||||
The python executable may not exist on all systems so use sys.executable
|
||||
instead.
|
||||
---
|
||||
utils/lit/lit/TestRunner.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/utils/lit/lit/TestRunner.py b/utils/lit/lit/TestRunner.py
|
||||
index e304381..4d903b4 100644
|
||||
--- a/utils/lit/lit/TestRunner.py
|
||||
+++ b/utils/lit/lit/TestRunner.py
|
||||
@@ -879,7 +879,7 @@ def _executeShCmd(cmd, shenv, results, timeoutHelper):
|
||||
# Expand all glob expressions
|
||||
args = expand_glob_expressions(args, cmd_shenv.cwd)
|
||||
if is_builtin_cmd:
|
||||
- args.insert(0, "python")
|
||||
+ args.insert(0, sys.executable)
|
||||
args[1] = os.path.join(builtin_commands_dir ,args[1] + ".py")
|
||||
|
||||
# On Windows, do our own command line quoting for better compatibility
|
||||
--
|
||||
1.8.3.1
|
||||
|
16
llvm.spec
16
llvm.spec
@ -50,7 +50,7 @@
|
||||
|
||||
Name: %{pkg_name}
|
||||
Version: %{maj_ver}.%{min_ver}.%{patch_ver}
|
||||
Release: 0.9.rc%{rc_ver}%{?dist}
|
||||
Release: 0.10.rc%{rc_ver}%{?dist}
|
||||
Summary: The Low Level Virtual Machine
|
||||
|
||||
License: NCSA
|
||||
@ -64,6 +64,11 @@ Patch7: 0001-Filter-out-cxxflags-not-supported-by-clang.patch
|
||||
Patch12: 0001-unittests-Don-t-install-TestPlugin.so.patch
|
||||
# rhbz#1618958
|
||||
Patch13: 0001-bpf-fix-an-assertion-in-BPFAsmBackend-applyFixup.patch
|
||||
# If python2 is available on the system, llvm will try to use it. This patch
|
||||
# removes the preferences for python2, so we can make sure we always use
|
||||
# python3.
|
||||
Patch14: 0001-CMake-Don-t-prefer-python2.7.patch
|
||||
Patch15: 0001-lit-Use-sys.executable-for-executing-builtin-command.patch
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: gcc-c++
|
||||
@ -72,8 +77,6 @@ BuildRequires: ninja-build
|
||||
BuildRequires: zlib-devel
|
||||
BuildRequires: libffi-devel
|
||||
BuildRequires: ncurses-devel
|
||||
# We need /usr/bin/python for some lit tests to work.
|
||||
BuildRequires: python-unversioned-command
|
||||
BuildRequires: python3-sphinx
|
||||
BuildRequires: multilib-rpm-config
|
||||
%if %{with gold}
|
||||
@ -86,6 +89,8 @@ BuildRequires: valgrind-devel
|
||||
%endif
|
||||
# LLVM's LineEditor library will use libedit if it is available.
|
||||
BuildRequires: libedit-devel
|
||||
# We need python3-devel for pathfix.py.
|
||||
BuildRequires: python3-devel
|
||||
|
||||
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||
|
||||
@ -150,6 +155,8 @@ LLVM's modified googletest sources.
|
||||
%prep
|
||||
%autosetup -n llvm-%{version}%{?rc_ver:rc%{rc_ver}}.src -p1
|
||||
|
||||
pathfix.py -i %{__python3} -pn test/BugPoint/compile-custom.ll.py
|
||||
|
||||
%build
|
||||
mkdir -p _build
|
||||
cd _build
|
||||
@ -410,6 +417,9 @@ fi
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Thu Aug 30 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-0.10.rc2
|
||||
- Drop all uses of python2 from lit tests
|
||||
|
||||
* Thu Aug 30 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-0.9.rc2
|
||||
- Build the gold plugin on all supported architectures
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user