+++ /dev/null
-From bcdf2c49b7686046f8a9a5664f0e46117997baf4 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
-Date: Sun, 21 Aug 2016 23:19:40 +0200
-Subject: [PATCH 09/10] cmake: Use system llvm-lit when lit.py does not exist
- in srcdir
-
-Modify the add_lit_target function to use lit.py from LLVM_MAIN_SRC_DIR
-only when one does exist there, and otherwise fall back to looking for
-system install of llvm-lit. This is based on a similar conditional in
-clang's CMakeLists.txt, and makes it possible to run clang's tests when
-built separately from LLVM with no access to the original sources.
-
-Patch: https://reviews.llvm.org/D23742
----
- cmake/modules/AddLLVM.cmake | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake
-index 83a2359..87540d5 100644
---- a/cmake/modules/AddLLVM.cmake
-+++ b/cmake/modules/AddLLVM.cmake
-@@ -1081,7 +1081,7 @@ function(add_lit_target target comment)
- if (NOT CMAKE_CFG_INTDIR STREQUAL ".")
- list(APPEND LIT_ARGS --param build_mode=${CMAKE_CFG_INTDIR})
- endif ()
-- if (LLVM_MAIN_SRC_DIR)
-+ if(EXISTS ${LLVM_MAIN_SRC_DIR}/utils/lit/lit.py)
- set (LIT_COMMAND ${PYTHON_EXECUTABLE} ${LLVM_MAIN_SRC_DIR}/utils/lit/lit.py)
- else()
- find_program(LIT_COMMAND llvm-lit)
---
-2.9.3
-
+++ /dev/null
-From 242fd2cbad1075d4cc0e3a3b64652dbc766bd117 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
-Date: Sun, 21 Aug 2016 23:20:11 +0200
-Subject: [PATCH 10/10] lit/setup.py: Install as llvm-lit (as cmake expects it)
-
-Modify the setup.py for lit to install the entry point as llvm-lit
-(instead of lit) since this is the name expected by functions in
-AddLLVM.cmake.
-
-Patch: https://reviews.llvm.org/D23743
----
- utils/lit/setup.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/utils/lit/setup.py b/utils/lit/setup.py
-index 10de6bb..c57e0aa 100644
---- a/utils/lit/setup.py
-+++ b/utils/lit/setup.py
-@@ -71,7 +71,7 @@ http://llvm.org/svn/llvm-project/llvm/trunk/utils/lit.
- packages = find_packages(),
- entry_points = {
- 'console_scripts': [
-- 'lit = lit:main',
-+ 'llvm-lit = lit:main',
- ],
- }
- )
---
-2.9.3
-
: ${CMAKE_MAKEFILE_GENERATOR:=ninja}
# (needed due to lib32 find_library fix)
CMAKE_MIN_VERSION=3.6.1-r1
-DISTUTILS_OPTIONAL=1
PYTHON_COMPAT=( python2_7 )
-inherit check-reqs cmake-utils distutils-r1 flag-o-matic git-r3 \
- multilib-minimal pax-utils toolchain-funcs
+inherit check-reqs cmake-utils flag-o-matic git-r3 \
+ multilib-minimal pax-utils python-any-r1 toolchain-funcs
DESCRIPTION="Low Level Virtual Machine"
HOMEPAGE="http://llvm.org/"
IUSE="debug +doc gold libedit +libffi multitarget ncurses ocaml test
video_cards_radeon elibc_musl kernel_Darwin"
-# python is needed for llvm-lit (which is installed)
RDEPEND="
sys-libs/zlib:0=
gold? ( >=sys-devel/binutils-2.22:*[cxx] )
ocaml? (
>=dev-lang/ocaml-4.00.0:0=
dev-ml/findlib
- dev-ml/ocaml-ctypes )
- ${PYTHON_DEPS}"
+ dev-ml/ocaml-ctypes )"
# configparser-3.2 breaks the build (3.3 or none at all are fine)
DEPEND="${RDEPEND}
dev-lang/perl
gold? ( sys-libs/binutils-libs )
libffi? ( virtual/pkgconfig )
ocaml? ( test? ( dev-ml/ounit ) )
- !!<dev-python/configparser-3.3.0.2"
+ !!<dev-python/configparser-3.3.0.2
+ ${PYTHON_DEPS}"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
# https://bugs.gentoo.org/show_bug.cgi?id=578392
eapply "${FILESDIR}"/9999/0008-cmake-Restore-SOVERSIONs-on-shared-libraries.patch
- # Fix lit tests to find installed llvm-lit correctly
- eapply "${FILESDIR}"/9999/0009-cmake-Use-system-llvm-lit-when-lit.py-does-not-exist.patch
- # Install lit as llvm-lit (as expected by cmake)
- eapply "${FILESDIR}"/9999/0010-lit-setup.py-Install-as-llvm-lit-as-cmake-expects-it.patch
-
# support building llvm against musl-libc
use elibc_musl && eapply "${FILESDIR}"/9999/musl-fixes.patch
pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/MCJIT/MCJITTests
pax-mark m "${BUILD_DIR}"/unittests/Support/SupportTests
fi
-
- # Run setup.py for lit
- cd "${S}"/utils/lit || die
- distutils-r1_src_compile
}
multilib_src_test() {
)
multilib-minimal_src_install
-
- # Install lit
- cd "${S}"/utils/lit || die
- distutils-r1_src_install
}
multilib_src_install() {