1 |
commit: 25a46c7e439dfe79ed97df2c8290c31f0ae328f8 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Mar 10 18:24:03 2019 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Mar 10 19:52:58 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=25a46c7e |
7 |
|
8 |
sys-devel/lld: Drop <6 |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
sys-devel/lld/Manifest | 4 - |
13 |
...D-specific-binary-library-dirs-when-build.patch | 97 ---------------------- |
14 |
...ib-cond-when-building-stand-alone-clean-u.patch | 82 ------------------ |
15 |
sys-devel/lld/lld-4.0.1.ebuild | 76 ----------------- |
16 |
sys-devel/lld/lld-5.0.2.ebuild | 73 ---------------- |
17 |
5 files changed, 332 deletions(-) |
18 |
|
19 |
diff --git a/sys-devel/lld/Manifest b/sys-devel/lld/Manifest |
20 |
index 48ee81c94a4..b4d30735696 100644 |
21 |
--- a/sys-devel/lld/Manifest |
22 |
+++ b/sys-devel/lld/Manifest |
23 |
@@ -1,11 +1,7 @@ |
24 |
-DIST lld-4.0.1.src.tar.xz 593796 BLAKE2B 58eb8f013a4562ef60dd7e17ddd741f434b8f0228a3d3d746ec8c30521ce667863d0b6db6565659a1b86cb91550cdaa43a27600d3a979460523faf24eac8ea3f SHA512 63bd0813094dc7fa9a95fdee93eb7b97026882a15548f819b5c67f3f0f9fa2a582d968af27ad8f802dbff1f6cd1b8c2fb26b3c7c80379488d05c4a4984d7af68 |
25 |
-DIST lld-5.0.2.src.tar.xz 671776 BLAKE2B 11c470fb7eb4e8ddad043cff7daa714b55b862fe0a540e135db7252314caa101e3bb9063d5a7b32e0a86721cc01f602cafe087566d49ef5c6865f19ba3daf6b3 SHA512 6edafc277a5475a4b44fdf2d77bb8d0a80e8717f74c6db6c0208e0f1492a552f50640503ba8687bcd87a3d677b571dc4f9579b1e5c0bf53059c259ecbcc78c0e |
26 |
DIST lld-6.0.1.src.tar.xz 787804 BLAKE2B 6b1d42bf24ca4c4dbfd060f1e40efa106e4adb73ee44a219f1568168b90b2a1430c3bd9c9e7996fda1f90423f8154678d6ee795ba4e179a0a72d86e980cbba52 SHA512 856ccc125255ab6184919f1424372f0f8a5de8477777047e2ab1a131a2ecec0caa9b5163d01409c7c510df9c794f0bc8d65cc904df2baf6462ef53bc163e002a |
27 |
DIST lld-7.0.1.src.tar.xz 912812 BLAKE2B 586f869350cb49eec661b72d575686d3627f2e094b492ad1d62ebad2a7aa14cff5582b51713ab02889c1f1bab20b38cfcb038e6753936688e6530f7b044e73ba SHA512 e5d3ed280d8ac6014cd6bbe080b11e2c4ebbae81dc14b637e779ec027d818dbae91c6f0de9e94bcecd6bdaa37f12c35141b5d81f0a15251d27932aa9bebd4047 |
28 |
DIST lld-8.0.0rc2.src.tar.xz 999024 BLAKE2B 866a36f95fc51408b511392cd48c923b1deb9307d72fae93726c189b78fae9ba0586a1ff188335e80f66a86c8c6de9d1c609deb72ed25438b558a7e4df7a00bd SHA512 ba59b603f83283a75b8b020a339c7381e2397e55165ffe86e194d8c1da5845a1e5187ba45d7a46bb136d69c2fac64fb4f97f0fa5eab1d17232e5f474764cc5f6 |
29 |
DIST lld-8.0.0rc3.src.tar.xz 999892 BLAKE2B e62141c0d93a762aecd12d72ab8a8fbfeb91896421f356401d1018bd09f713f8ebc73fc3e1a80e4260c413d705ae7f5a51a7009f056e040ab5851909b19efabc SHA512 4858afd97ab605440590c5fdcdeb82b0496e391b2719eb805b799b645c9c3d305c71cf1cf2d9eb37a845903a149d2461a582de3ef97fa9b662c3ad31c5cb1064 |
30 |
-DIST llvm-4.0.1.src.tar.xz 21065652 BLAKE2B 6327eed2d1feb108440f22d2581d1ff86c10a10c29793538d8d899c7e2dc83d3f7b147d3fd4bcce2bd2bf57c071b08c624aeafe40a3e7a3914506e7751727e6c SHA512 16adc39b34ddb628f81b171119a8e2a0e9138b25011e803ef0b688e2fbea116fc4953d3a1b61b90a98a75e33619f81566b7cb06a9a2ea4d04ac5e0eb303a2d1d |
31 |
-DIST llvm-5.0.2.src.tar.xz 23451868 BLAKE2B b7082be2e4ad557b29b9f6869811f262adcf5c73d552faf91b339bede75cf5eab58afefa12fa779a38be71fe2b8f4ea297c3213ee4e8370cc01972c59249d91c SHA512 3588be5ed969c3f7f6f16f56a12a6af2814d3d3c960d4a36ffebb0446cc75f19220bccee7fc605f9b01f5d5c188a905a046193cc12dec42dd5922048b5c27fe1 |
32 |
DIST llvm-6.0.1.src.tar.xz 25306628 BLAKE2B 60232d4d22f8096b565cc8d81fea0639f24f14e8fc4f66ade69fa15479181f07f655f26dff3fa24bf105762b495da316c5c9352db234bd0af6b9c3fff6d4d881 SHA512 cbbb00eb99cfeb4aff623ee1a5ba075e7b5a76fc00c5f9f539ff28c108598f5708a0369d5bd92683def5a20c2fe60cab7827b42d628dbfcc79b57e0e91b84dd9 |
33 |
DIST llvm-7.0.1.src.tar.xz 28311056 BLAKE2B 737aa6144a415e41a4ff2c8bd5a727d6f14d7b1810c62cbefa5a25fe642c98cddf8a28e35c7e9783373aa3b96f5c0943229e229ad1b43e56e9ed6db0f27ab128 SHA512 ac43a3cb71a53deb55e3693653847cf20bf6f5d9056f224e6956c96d63bc59ebee9404f088eec9cabe65337b4607a905ef931354b373cf64e0004c6905a6b5df |
34 |
DIST llvm-8.0.0rc2.src.tar.xz 30492444 BLAKE2B e7afd3b66e3eb204e07348f0bc77f0ae03d8e9581de4c94cba7c0b43b53f36ecd891c1272ce43ea6c78999fd404a7db105266a2eaca22975133571e1152961af SHA512 9d93197848e9472cc2fef2477897e4f4d74a79b17a164fd43446b0ffb327e7f484cf64f0c294d9a99707c0b46282eb0d16e6ceb5d2d568f25e4235f70ae3c5e7 |
35 |
|
36 |
diff --git a/sys-devel/lld/files/4.0.1/0002-test-Use-LLD-specific-binary-library-dirs-when-build.patch b/sys-devel/lld/files/4.0.1/0002-test-Use-LLD-specific-binary-library-dirs-when-build.patch |
37 |
deleted file mode 100644 |
38 |
index 2a7935f7683..00000000000 |
39 |
--- a/sys-devel/lld/files/4.0.1/0002-test-Use-LLD-specific-binary-library-dirs-when-build.patch |
40 |
+++ /dev/null |
41 |
@@ -1,97 +0,0 @@ |
42 |
-From 72b099306f586382a32cb0b37ad6a07dc7cddcf9 Mon Sep 17 00:00:00 2001 |
43 |
-From: Michal Gorny <mgorny@g.o> |
44 |
-Date: Wed, 8 Feb 2017 20:08:25 +0000 |
45 |
-Subject: [PATCH 2/3] [test] Use LLD-specific binary&library dirs when building |
46 |
- stand-alone |
47 |
- |
48 |
-Use both LLD- and LLVM-specific binary&library directories when LLD is |
49 |
-being built stand-alone. This ensures that the freshly built tools and |
50 |
-libraries are found and used correctly. |
51 |
- |
52 |
-Without this patch, the test suite uses LLVM_TOOLS_DIR and LLVM_LIBS_DIR |
53 |
-to locate lld, and set PATH and LD_LIBRARY_PATH. When doing |
54 |
-a stand-alone builds, these variables represent the installed LLVM. |
55 |
-As a result, tests either fail due to missing lld executables/libraries |
56 |
-or use an earlier installed LLD version rather than the one being built. |
57 |
- |
58 |
-To solve this, an additional LLD_TOOLS_DIR and LLD_LIBS_DIR variables |
59 |
-are added that are populated using LLVM_*_OUTPUT_INTDIR. Those variables |
60 |
-are populated with directories used to output built executables |
61 |
-and libraries. In stand-alone builds, they represent the directories |
62 |
-used by LLD. In integrated builds, they have the same values as |
63 |
-LLVM_*_DIR and therefore using them does not harm. |
64 |
- |
65 |
-The new variables are prepended to PATH and LD_LIBRARY_PATH to ensure |
66 |
-that freshly built binaries are preferred over potentially earlier |
67 |
-installed ones. Furthermore, the resulting PATH is used to locate tools |
68 |
-for substitutions since the search includes both tools built as part of |
69 |
-LLD and of LLVM. |
70 |
- |
71 |
-Differential Revision: https://reviews.llvm.org/D29335 |
72 |
- |
73 |
-git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@294507 91177308-0d34-0410-b5e6-96231b3b80d8 |
74 |
---- |
75 |
- test/lit.cfg | 14 ++++++++++---- |
76 |
- test/lit.site.cfg.in | 2 ++ |
77 |
- 2 files changed, 12 insertions(+), 4 deletions(-) |
78 |
- |
79 |
-diff --git a/test/lit.cfg b/test/lit.cfg |
80 |
-index 0db879312..8dff2fb4e 100644 |
81 |
---- a/test/lit.cfg |
82 |
-+++ b/test/lit.cfg |
83 |
-@@ -66,18 +66,24 @@ config.llvm_obj_root = getattr(config, 'llvm_obj_root', None) |
84 |
- |
85 |
- # Tweak the PATH to include the tools dir and the scripts dir. |
86 |
- if lld_obj_root is not None: |
87 |
-+ lld_tools_dir = getattr(config, 'lld_tools_dir', None) |
88 |
-+ if not lld_tools_dir: |
89 |
-+ lit_config.fatal('No LLD tools dir set!') |
90 |
- llvm_tools_dir = getattr(config, 'llvm_tools_dir', None) |
91 |
- if not llvm_tools_dir: |
92 |
- lit_config.fatal('No LLVM tools dir set!') |
93 |
-- path = os.path.pathsep.join((llvm_tools_dir, config.environment['PATH'])) |
94 |
-+ path = os.path.pathsep.join((lld_tools_dir, llvm_tools_dir, config.environment['PATH'])) |
95 |
- path = os.path.pathsep.join((os.path.join(getattr(config, 'llvm_src_root', None),'test','Scripts'),path)) |
96 |
- |
97 |
- config.environment['PATH'] = path |
98 |
- |
99 |
-+ lld_libs_dir = getattr(config, 'lld_libs_dir', None) |
100 |
-+ if not lld_libs_dir: |
101 |
-+ lit_config.fatal('No LLD libs dir set!') |
102 |
- llvm_libs_dir = getattr(config, 'llvm_libs_dir', None) |
103 |
- if not llvm_libs_dir: |
104 |
- lit_config.fatal('No LLVM libs dir set!') |
105 |
-- path = os.path.pathsep.join((llvm_libs_dir, |
106 |
-+ path = os.path.pathsep.join((lld_libs_dir, llvm_libs_dir, |
107 |
- config.environment.get('LD_LIBRARY_PATH',''))) |
108 |
- config.environment['LD_LIBRARY_PATH'] = path |
109 |
- |
110 |
-@@ -174,10 +180,10 @@ for pattern in tool_patterns: |
111 |
- pattern) |
112 |
- tool_pipe = tool_match.group(2) |
113 |
- tool_name = tool_match.group(4) |
114 |
-- tool_path = lit.util.which(tool_name, llvm_tools_dir) |
115 |
-+ tool_path = lit.util.which(tool_name, config.environment['PATH']) |
116 |
- if not tool_path: |
117 |
- # Warn, but still provide a substitution. |
118 |
-- lit_config.note('Did not find ' + tool_name + ' in ' + llvm_tools_dir) |
119 |
-+ lit_config.note('Did not find ' + tool_name + ' in ' + path) |
120 |
- tool_path = llvm_tools_dir + '/' + tool_name |
121 |
- config.substitutions.append((pattern, tool_pipe + tool_path)) |
122 |
- |
123 |
-diff --git a/test/lit.site.cfg.in b/test/lit.site.cfg.in |
124 |
-index 5293f24c1..9dcb48174 100644 |
125 |
---- a/test/lit.site.cfg.in |
126 |
-+++ b/test/lit.site.cfg.in |
127 |
-@@ -6,6 +6,8 @@ config.llvm_tools_dir = "@LLVM_TOOLS_DIR@" |
128 |
- config.llvm_libs_dir = "@LLVM_LIBS_DIR@" |
129 |
- config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@" |
130 |
- config.lld_obj_root = "@LLD_BINARY_DIR@" |
131 |
-+config.lld_libs_dir = "@LLVM_LIBRARY_OUTPUT_INTDIR@" |
132 |
-+config.lld_tools_dir = "@LLVM_RUNTIME_OUTPUT_INTDIR@" |
133 |
- config.target_triple = "@TARGET_TRIPLE@" |
134 |
- config.python_executable = "@PYTHON_EXECUTABLE@" |
135 |
- config.have_zlib = "@HAVE_LIBZ@" |
136 |
--- |
137 |
-2.12.0 |
138 |
- |
139 |
|
140 |
diff --git a/sys-devel/lld/files/4.0.1/0003-test-Fix-zlib-cond-when-building-stand-alone-clean-u.patch b/sys-devel/lld/files/4.0.1/0003-test-Fix-zlib-cond-when-building-stand-alone-clean-u.patch |
141 |
deleted file mode 100644 |
142 |
index b1333ac40bc..00000000000 |
143 |
--- a/sys-devel/lld/files/4.0.1/0003-test-Fix-zlib-cond-when-building-stand-alone-clean-u.patch |
144 |
+++ /dev/null |
145 |
@@ -1,82 +0,0 @@ |
146 |
-From a7fe305520085cff8e4bec0110d323c4f1ccbcab Mon Sep 17 00:00:00 2001 |
147 |
-From: Michal Gorny <mgorny@g.o> |
148 |
-Date: Wed, 8 Feb 2017 20:08:29 +0000 |
149 |
-Subject: [PATCH 3/3] [test] Fix zlib cond when building stand-alone, clean up |
150 |
- |
151 |
-Fix the test zlib conditional to use LLVM_ENABLE_ZLIB value when |
152 |
-building stand-alone. The HAVE_LIBZ is not available when performing |
153 |
-a stand-alone build. Since the zlib support is a feature of |
154 |
-the underlying LLVM library, it exports the actual status as the final |
155 |
-value of LLVM_ENABLE_ZLIB in LLVMConfig. |
156 |
- |
157 |
-While at it, canonicalize the boolean value into 0/1 and remove unused |
158 |
-CMake definitions (most likely copied from clang). |
159 |
- |
160 |
-Differential Revision: https://reviews.llvm.org/D29340 |
161 |
- |
162 |
-git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@294508 91177308-0d34-0410-b5e6-96231b3b80d8 |
163 |
---- |
164 |
- test/CMakeLists.txt | 19 ++++++++++++------- |
165 |
- test/lit.cfg | 2 +- |
166 |
- test/lit.site.cfg.in | 2 +- |
167 |
- 3 files changed, 14 insertions(+), 9 deletions(-) |
168 |
- |
169 |
-diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt |
170 |
-index ede92c13d..962274160 100644 |
171 |
---- a/test/CMakeLists.txt |
172 |
-+++ b/test/CMakeLists.txt |
173 |
-@@ -3,13 +3,18 @@ set(LLVM_BINARY_DIR "${LLVM_BINARY_DIR}") |
174 |
- set(LLVM_BUILD_MODE "%(build_mode)s") |
175 |
- set(LLVM_TOOLS_DIR "${LLVM_TOOLS_BINARY_DIR}/%(build_config)s") |
176 |
- set(LLVM_LIBS_DIR "${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/%(build_config)s") |
177 |
--set(CLANG_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/..") |
178 |
--set(CLANG_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/..") |
179 |
--if(BUILD_SHARED_LIBS) |
180 |
-- set(ENABLE_SHARED 1) |
181 |
--else() |
182 |
-- set(ENABLE_SHARED 0) |
183 |
--endif(BUILD_SHARED_LIBS) |
184 |
-+ |
185 |
-+if(LLD_BUILT_STANDALONE) |
186 |
-+ # Set HAVE_LIBZ according to recorded LLVM_ENABLE_ZLIB value. This |
187 |
-+ # value is forced to 0 if zlib was not found, so it is fine to use it |
188 |
-+ # instead of HAVE_LIBZ (not recorded). |
189 |
-+ if(LLVM_ENABLE_ZLIB) |
190 |
-+ set(HAVE_LIBZ 1) |
191 |
-+ endif() |
192 |
-+endif() |
193 |
-+ |
194 |
-+llvm_canonicalize_cmake_booleans( |
195 |
-+ HAVE_LIBZ) |
196 |
- |
197 |
- configure_lit_site_cfg( |
198 |
- ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in |
199 |
-diff --git a/test/lit.cfg b/test/lit.cfg |
200 |
-index 8dff2fb4e..85469ff6f 100644 |
201 |
---- a/test/lit.cfg |
202 |
-+++ b/test/lit.cfg |
203 |
-@@ -202,7 +202,7 @@ if execute_external: |
204 |
- config.available_features.add('shell') |
205 |
- |
206 |
- # zlib compression library |
207 |
--if config.have_zlib == "1": |
208 |
-+if config.have_zlib: |
209 |
- config.available_features.add("zlib") |
210 |
- |
211 |
- # Running on Darwin OS |
212 |
-diff --git a/test/lit.site.cfg.in b/test/lit.site.cfg.in |
213 |
-index 9dcb48174..1fb8d3690 100644 |
214 |
---- a/test/lit.site.cfg.in |
215 |
-+++ b/test/lit.site.cfg.in |
216 |
-@@ -10,7 +10,7 @@ config.lld_libs_dir = "@LLVM_LIBRARY_OUTPUT_INTDIR@" |
217 |
- config.lld_tools_dir = "@LLVM_RUNTIME_OUTPUT_INTDIR@" |
218 |
- config.target_triple = "@TARGET_TRIPLE@" |
219 |
- config.python_executable = "@PYTHON_EXECUTABLE@" |
220 |
--config.have_zlib = "@HAVE_LIBZ@" |
221 |
-+config.have_zlib = @HAVE_LIBZ@ |
222 |
- |
223 |
- # Support substitution of the tools and libs dirs with user parameters. This is |
224 |
- # used when we can't determine the tool dir at configuration time. |
225 |
--- |
226 |
-2.12.0 |
227 |
- |
228 |
|
229 |
diff --git a/sys-devel/lld/lld-4.0.1.ebuild b/sys-devel/lld/lld-4.0.1.ebuild |
230 |
deleted file mode 100644 |
231 |
index ca675419d67..00000000000 |
232 |
--- a/sys-devel/lld/lld-4.0.1.ebuild |
233 |
+++ /dev/null |
234 |
@@ -1,76 +0,0 @@ |
235 |
-# Copyright 1999-2017 Gentoo Foundation |
236 |
-# Distributed under the terms of the GNU General Public License v2 |
237 |
- |
238 |
-EAPI=6 |
239 |
- |
240 |
-: ${CMAKE_MAKEFILE_GENERATOR:=ninja} |
241 |
-# (needed due to CMAKE_BUILD_TYPE != Gentoo) |
242 |
-CMAKE_MIN_VERSION=3.7.0-r1 |
243 |
-PYTHON_COMPAT=( python2_7 ) |
244 |
- |
245 |
-inherit cmake-utils llvm python-any-r1 |
246 |
- |
247 |
-DESCRIPTION="The LLVM linker (link editor)" |
248 |
-HOMEPAGE="https://llvm.org/" |
249 |
-SRC_URI="https://releases.llvm.org/${PV/_//}/${P/_/}.src.tar.xz |
250 |
- test? ( https://releases.llvm.org/${PV/_//}/llvm-${PV/_/}.src.tar.xz )" |
251 |
- |
252 |
-LICENSE="UoI-NCSA" |
253 |
-SLOT="0" |
254 |
-KEYWORDS="~amd64 ~arm64 ~x86" |
255 |
-IUSE="test" |
256 |
- |
257 |
-RDEPEND="~sys-devel/llvm-${PV}" |
258 |
-DEPEND="${RDEPEND} |
259 |
- test? ( $(python_gen_any_dep "~dev-python/lit-${PV}[\${PYTHON_USEDEP}]") )" |
260 |
- |
261 |
-S=${WORKDIR}/${P/_/}.src |
262 |
- |
263 |
-# least intrusive of all |
264 |
-CMAKE_BUILD_TYPE=RelWithDebInfo |
265 |
- |
266 |
-python_check_deps() { |
267 |
- has_version "dev-python/lit[${PYTHON_USEDEP}]" |
268 |
-} |
269 |
- |
270 |
-pkg_setup() { |
271 |
- LLVM_MAX_SLOT=${PV%%.*} llvm_pkg_setup |
272 |
- use test && python-any-r1_pkg_setup |
273 |
-} |
274 |
- |
275 |
-src_unpack() { |
276 |
- default |
277 |
- |
278 |
- if use test; then |
279 |
- mv llvm-* llvm || die |
280 |
- fi |
281 |
-} |
282 |
- |
283 |
-src_prepare() { |
284 |
- # backport stand-alone build test fixes from master |
285 |
- eapply "${FILESDIR}/4.0.1/0002-test-Use-LLD-specific-binary-library-dirs-when-build.patch" |
286 |
- eapply "${FILESDIR}/4.0.1/0003-test-Fix-zlib-cond-when-building-stand-alone-clean-u.patch" |
287 |
- |
288 |
- cmake-utils_src_prepare |
289 |
-} |
290 |
- |
291 |
-src_configure() { |
292 |
- local mycmakeargs=( |
293 |
- -DBUILD_SHARED_LIBS=ON |
294 |
- |
295 |
- -DLLVM_INCLUDE_TESTS=$(usex test) |
296 |
- # TODO: fix detecting pthread upstream in stand-alone build |
297 |
- -DPTHREAD_LIB='-lpthread' |
298 |
- ) |
299 |
- use test && mycmakeargs+=( |
300 |
- -DLLVM_BUILD_TESTS=ON |
301 |
- -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" |
302 |
- -DLIT_COMMAND="${EPREFIX}/usr/bin/lit" |
303 |
- ) |
304 |
- |
305 |
- cmake-utils_src_configure |
306 |
-} |
307 |
- |
308 |
-src_test() { |
309 |
- cmake-utils_src_make check-lld |
310 |
-} |
311 |
|
312 |
diff --git a/sys-devel/lld/lld-5.0.2.ebuild b/sys-devel/lld/lld-5.0.2.ebuild |
313 |
deleted file mode 100644 |
314 |
index a73ea749a34..00000000000 |
315 |
--- a/sys-devel/lld/lld-5.0.2.ebuild |
316 |
+++ /dev/null |
317 |
@@ -1,73 +0,0 @@ |
318 |
-# Copyright 1999-2017 Gentoo Foundation |
319 |
-# Distributed under the terms of the GNU General Public License v2 |
320 |
- |
321 |
-EAPI=6 |
322 |
- |
323 |
-: ${CMAKE_MAKEFILE_GENERATOR:=ninja} |
324 |
-# (needed due to CMAKE_BUILD_TYPE != Gentoo) |
325 |
-CMAKE_MIN_VERSION=3.7.0-r1 |
326 |
-PYTHON_COMPAT=( python2_7 ) |
327 |
- |
328 |
-inherit cmake-utils llvm python-any-r1 |
329 |
- |
330 |
-MY_P=${P/_/}.src |
331 |
-LLVM_P=llvm-${PV/_/}.src |
332 |
- |
333 |
-DESCRIPTION="The LLVM linker (link editor)" |
334 |
-HOMEPAGE="https://llvm.org/" |
335 |
-SRC_URI="https://releases.llvm.org/${PV/_//}/${MY_P}.tar.xz |
336 |
- test? ( https://releases.llvm.org/${PV/_//}/${LLVM_P}.tar.xz )" |
337 |
- |
338 |
-LICENSE="UoI-NCSA" |
339 |
-SLOT="0" |
340 |
-KEYWORDS="~amd64 ~arm64 ~x86" |
341 |
-IUSE="test" |
342 |
- |
343 |
-RDEPEND="~sys-devel/llvm-${PV}" |
344 |
-DEPEND="${RDEPEND} |
345 |
- test? ( $(python_gen_any_dep "~dev-python/lit-${PV}[\${PYTHON_USEDEP}]") )" |
346 |
- |
347 |
-S=${WORKDIR}/${MY_P} |
348 |
- |
349 |
-# least intrusive of all |
350 |
-CMAKE_BUILD_TYPE=RelWithDebInfo |
351 |
- |
352 |
-python_check_deps() { |
353 |
- has_version "dev-python/lit[${PYTHON_USEDEP}]" |
354 |
-} |
355 |
- |
356 |
-pkg_setup() { |
357 |
- LLVM_MAX_SLOT=${PV%%.*} llvm_pkg_setup |
358 |
- use test && python-any-r1_pkg_setup |
359 |
-} |
360 |
- |
361 |
-src_unpack() { |
362 |
- einfo "Unpacking ${MY_P}.tar.xz ..." |
363 |
- tar -xf "${DISTDIR}/${MY_P}.tar.xz" || die |
364 |
- |
365 |
- if use test; then |
366 |
- einfo "Unpacking parts of ${LLVM_P}.tar.xz ..." |
367 |
- tar -xf "${DISTDIR}/${LLVM_P}.tar.xz" \ |
368 |
- "${LLVM_P}"/utils/{lit,unittest} || die |
369 |
- mv "${LLVM_P}" llvm || die |
370 |
- fi |
371 |
-} |
372 |
- |
373 |
-src_configure() { |
374 |
- local mycmakeargs=( |
375 |
- -DBUILD_SHARED_LIBS=ON |
376 |
- |
377 |
- -DLLVM_INCLUDE_TESTS=$(usex test) |
378 |
- ) |
379 |
- use test && mycmakeargs+=( |
380 |
- -DLLVM_BUILD_TESTS=ON |
381 |
- -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" |
382 |
- -DLIT_COMMAND="${EPREFIX}/usr/bin/lit" |
383 |
- ) |
384 |
- |
385 |
- cmake-utils_src_configure |
386 |
-} |
387 |
- |
388 |
-src_test() { |
389 |
- cmake-utils_src_make check-lld |
390 |
-} |