Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/llvm/
Date: Thu, 29 Sep 2016 14:13:29
Message-Id: 1475158377.bbb81adbfb550e7e4a71329b2e11f5aa79953428.mgorny@gentoo
1 commit: bbb81adbfb550e7e4a71329b2e11f5aa79953428
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sat Sep 24 19:37:11 2016 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Thu Sep 29 14:12:57 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bbb81adb
7
8 sys-devel/llvm: Use LLVM_TARGETS flags
9
10 sys-devel/llvm/llvm-9999.ebuild | 21 ++++++++++-----------
11 1 file changed, 10 insertions(+), 11 deletions(-)
12
13 diff --git a/sys-devel/llvm/llvm-9999.ebuild b/sys-devel/llvm/llvm-9999.ebuild
14 index 4c8d6da..526f253 100644
15 --- a/sys-devel/llvm/llvm-9999.ebuild
16 +++ b/sys-devel/llvm/llvm-9999.ebuild
17 @@ -18,11 +18,16 @@ SRC_URI=""
18 EGIT_REPO_URI="http://llvm.org/git/llvm.git
19 https://github.com/llvm-mirror/llvm.git"
20
21 +# Keep in sync with CMakeLists.txt
22 +ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430
23 + NVPTX PowerPC Sparc SystemZ X86 XCore )
24 +ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
25 +
26 LICENSE="UoI-NCSA"
27 SLOT="0/${PV%.*}"
28 KEYWORDS=""
29 IUSE="debug +doc gold libedit +libffi multitarget ncurses ocaml test
30 - video_cards_radeon elibc_musl kernel_Darwin"
31 + elibc_musl kernel_Darwin ${ALL_LLVM_TARGETS[*]}"
32
33 RDEPEND="
34 sys-libs/zlib:0=
35 @@ -49,7 +54,9 @@ DEPEND="${RDEPEND}
36 !!<dev-python/configparser-3.3.0.2
37 ${PYTHON_DEPS}"
38
39 -REQUIRED_USE="${PYTHON_REQUIRED_USE}"
40 +REQUIRED_USE="${PYTHON_REQUIRED_USE}
41 + || ( ${ALL_LLVM_TARGETS[*]} )
42 + multitarget? ( ${ALL_LLVM_TARGETS[*]} )"
43
44 pkg_pretend() {
45 # in megs
46 @@ -121,14 +128,6 @@ src_prepare() {
47 }
48
49 multilib_src_configure() {
50 - local targets
51 - if use multitarget; then
52 - targets=all
53 - else
54 - targets='host;BPF'
55 - use video_cards_radeon && targets+=';AMDGPU'
56 - fi
57 -
58 local ffi_cflags ffi_ldflags
59 if use libffi; then
60 ffi_cflags=$(pkg-config --cflags-only-I libffi)
61 @@ -140,7 +139,7 @@ multilib_src_configure() {
62 -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
63
64 -DBUILD_SHARED_LIBS=ON
65 - -DLLVM_TARGETS_TO_BUILD="${targets}"
66 + -DLLVM_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}"
67 -DLLVM_BUILD_TESTS=$(usex test)
68
69 -DLLVM_ENABLE_FFI=$(usex libffi)