1 |
commit: c13da17c70458357c3f3534710f1153a93d37079 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Oct 12 09:16:21 2020 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Oct 12 12:38:18 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c13da17c |
7 |
|
8 |
sys-libs/compiler-rt-sanitizers: Remove 11.0.0 RCs |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
sys-libs/compiler-rt-sanitizers/Manifest | 3 - |
13 |
.../compiler-rt-sanitizers-11.0.0_rc3.ebuild | 148 --------------------- |
14 |
.../compiler-rt-sanitizers-11.0.0_rc4.ebuild | 148 --------------------- |
15 |
.../compiler-rt-sanitizers-11.0.0_rc6.ebuild | 148 --------------------- |
16 |
4 files changed, 447 deletions(-) |
17 |
|
18 |
diff --git a/sys-libs/compiler-rt-sanitizers/Manifest b/sys-libs/compiler-rt-sanitizers/Manifest |
19 |
index dc8a7ae8e29..52eb105e0cf 100644 |
20 |
--- a/sys-libs/compiler-rt-sanitizers/Manifest |
21 |
+++ b/sys-libs/compiler-rt-sanitizers/Manifest |
22 |
@@ -1,7 +1,4 @@ |
23 |
DIST llvmorg-10.0.0.tar.gz 120804856 BLAKE2B 6b0254f5b913398cdcf2b2ec1ff219888706d2b79d5296590934714e42ac79f6a6547941ac2b1d2c4e6313dd18b6c7068e748aa6ac033e49fccbf5d355aa8191 SHA512 baa182d62fef1851836013ae8a1a00861ea89769778d67fb97b407a9de664e6c85da2af9c5b3f75d2bf34ff6b00004e531ca7e4b3115a26c0e61c575cf2303a0 |
24 |
DIST llvmorg-10.0.1.tar.gz 120880730 BLAKE2B 30f19f56c4d1f6abcda5fec76256219d1e3c8a6ff1a1f152f94bfe362c07884339fe571ff7fe903ed3b3deb150b2fa868c387887a0dea2930dc08b81db71a5b1 SHA512 48078fff9293a87f1a973f3348f79506f04c3da774295f5eb67d74dd2d1aa94f0973f8ced3f4ab9e8339902071f82c603b43d5608ad7227046c4da769c5d2151 |
25 |
-DIST llvmorg-11.0.0-rc3.tar.gz 122766783 BLAKE2B 052fdc864fed52692141284ebdc41d52d21fbeaf24ac5ed3e67701537baa683bae61b1c06de68322e0578a27a1f5a8856088cdc001d2b8d34d2ec88ae65ff739 SHA512 a28ce74775373c63fe23b3116cd25db0efb95c6fdb60e56f2522659a404a59576f3d9429a109cb0f90534927259289aa1c712673f36f92272d642bf8dce5699f |
26 |
-DIST llvmorg-11.0.0-rc4.tar.gz 122768150 BLAKE2B e92417b6e1775a10c196534518036de6393e3cb9e0e656d4f864e7870be8fb0dad3f4cf170345e653ba60f36172df117977d5dfebe3d9ee7ec2c160d3dc9c5cd SHA512 ed2aee9f6d0bb887f27840158e9f95d94c9ad3981a0388a33fcd3e405f5072134a02999075238b6a2b8803149aa08ac790214605b186c2cc2d4827ba53c00de1 |
27 |
-DIST llvmorg-11.0.0-rc6.tar.gz 122769521 BLAKE2B 0d03f385447902846dcb8150bda85ac0ab42153f63bb653befc18ed1cba357493065777750447b0ac71c077f61ea8c8f7a4c313ea5f3079926ffd012ace0debd SHA512 249b8e685cfc45a651f4dbd777b10298251c77476b57f9657860644ded612f810224d16879225d17b7a6ac9d584d63d53a33ac114c38e1cf86dd9e8d0faed9a9 |
28 |
DIST llvmorg-11.0.0.tar.gz 122743665 BLAKE2B 3f95570240789fd68ddb747df817f5c6cdc9da40911bbe9ee3531c15ada9165e5002b1c2f778cf8735858485ea05a8754e3d3a5f4b15bdd6cb33d64a14692984 SHA512 b6d38871ccce0e086e27d35e42887618d68e57d8274735c59e3eabc42dee352412489296293f8d5169fe0044936345915ee7da61ebdc64ec10f7737f6ecd90f2 |
29 |
DIST llvmorg-9.0.1.tar.gz 113193320 BLAKE2B b86e405f2b8e00436045fd409fe19cdde75c797b1192c62a22b5ec75e6b4dc8e874a0f33008dc31562445e4cbe53a992b6f48c684255a6a1ef261e595b8b161f SHA512 fa88beeaae94b6d0cd9b5ba38658d0ffed8004035d7d8a4f95c3d31a709b88b581ae9bd7761333c8e5375c44b8f6be01768b5a3be901163159d7e6c43b71da59 |
30 |
|
31 |
diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-11.0.0_rc3.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-11.0.0_rc3.ebuild |
32 |
deleted file mode 100644 |
33 |
index cecd595ac6c..00000000000 |
34 |
--- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-11.0.0_rc3.ebuild |
35 |
+++ /dev/null |
36 |
@@ -1,148 +0,0 @@ |
37 |
-# Copyright 1999-2020 Gentoo Authors |
38 |
-# Distributed under the terms of the GNU General Public License v2 |
39 |
- |
40 |
-EAPI=7 |
41 |
- |
42 |
-PYTHON_COMPAT=( python3_{6..9} ) |
43 |
-inherit check-reqs cmake flag-o-matic llvm llvm.org python-any-r1 |
44 |
- |
45 |
-DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)" |
46 |
-HOMEPAGE="https://llvm.org/" |
47 |
-LLVM_COMPONENTS=( compiler-rt ) |
48 |
-LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support llvm/utils/unittest ) |
49 |
-llvm.org_set_globals |
50 |
- |
51 |
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" |
52 |
-SLOT="$(ver_cut 1-3)" |
53 |
-KEYWORDS="" |
54 |
-IUSE="+clang +libfuzzer +profile +sanitize test +xray elibc_glibc" |
55 |
-# FIXME: libfuzzer does not enable all its necessary dependencies |
56 |
-REQUIRED_USE="libfuzzer? ( || ( sanitize xray ) )" |
57 |
-RESTRICT="!test? ( test ) !clang? ( test )" |
58 |
- |
59 |
-CLANG_SLOT=${SLOT%%.*} |
60 |
-# llvm-6 for new lit options |
61 |
-DEPEND=" |
62 |
- >=sys-devel/llvm-6" |
63 |
-BDEPEND=" |
64 |
- clang? ( sys-devel/clang ) |
65 |
- elibc_glibc? ( net-libs/libtirpc ) |
66 |
- test? ( |
67 |
- !<sys-apps/sandbox-2.13 |
68 |
- $(python_gen_any_dep ">=dev-python/lit-5[\${PYTHON_USEDEP}]") |
69 |
- =sys-devel/clang-${PV%_*}*:${CLANG_SLOT} |
70 |
- sys-libs/compiler-rt:${SLOT} ) |
71 |
- ${PYTHON_DEPS}" |
72 |
- |
73 |
-python_check_deps() { |
74 |
- use test || return 0 |
75 |
- has_version "dev-python/lit[${PYTHON_USEDEP}]" |
76 |
-} |
77 |
- |
78 |
-check_space() { |
79 |
- if use test; then |
80 |
- local CHECKREQS_DISK_BUILD=11G |
81 |
- check-reqs_pkg_pretend |
82 |
- fi |
83 |
-} |
84 |
- |
85 |
-pkg_pretend() { |
86 |
- check_space |
87 |
-} |
88 |
- |
89 |
-pkg_setup() { |
90 |
- check_space |
91 |
- llvm_pkg_setup |
92 |
- python-any-r1_pkg_setup |
93 |
-} |
94 |
- |
95 |
-src_prepare() { |
96 |
- sed -i -e 's:-Werror::' lib/tsan/go/buildgo.sh || die |
97 |
- |
98 |
- llvm.org_src_prepare |
99 |
-} |
100 |
- |
101 |
-src_configure() { |
102 |
- # pre-set since we need to pass it to cmake |
103 |
- BUILD_DIR=${WORKDIR}/compiler-rt_build |
104 |
- |
105 |
- if use clang; then |
106 |
- local -x CC=${CHOST}-clang |
107 |
- local -x CXX=${CHOST}-clang++ |
108 |
- strip-unsupported-flags |
109 |
- fi |
110 |
- |
111 |
- local mycmakeargs=( |
112 |
- -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${SLOT}" |
113 |
- # use a build dir structure consistent with install |
114 |
- # this makes it possible to easily deploy test-friendly clang |
115 |
- -DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${SLOT}" |
116 |
- |
117 |
- -DCOMPILER_RT_INCLUDE_TESTS=$(usex test) |
118 |
- # builtins & crt installed by sys-libs/compiler-rt |
119 |
- -DCOMPILER_RT_BUILD_BUILTINS=OFF |
120 |
- -DCOMPILER_RT_BUILD_CRT=OFF |
121 |
- -DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer) |
122 |
- -DCOMPILER_RT_BUILD_PROFILE=$(usex profile) |
123 |
- -DCOMPILER_RT_BUILD_SANITIZERS=$(usex sanitize) |
124 |
- -DCOMPILER_RT_BUILD_XRAY=$(usex xray) |
125 |
- ) |
126 |
- if use test; then |
127 |
- mycmakeargs+=( |
128 |
- -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" |
129 |
- -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit" |
130 |
- -DLLVM_LIT_ARGS="$(get_lit_flags)" |
131 |
- |
132 |
- # they are created during src_test() |
133 |
- -DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang" |
134 |
- -DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang++" |
135 |
- ) |
136 |
- |
137 |
- # same flags are passed for build & tests, so we need to strip |
138 |
- # them down to a subset supported by clang |
139 |
- CC=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang \ |
140 |
- CXX=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang++ \ |
141 |
- strip-unsupported-flags |
142 |
- fi |
143 |
- |
144 |
- if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then |
145 |
- mycmakeargs+=( |
146 |
- # disable use of SDK for the system itself |
147 |
- -DDARWIN_macosx_CACHED_SYSROOT=/ |
148 |
- ) |
149 |
- fi |
150 |
- |
151 |
- cmake_src_configure |
152 |
- |
153 |
- if use test; then |
154 |
- local sys_dir=( "${EPREFIX}"/usr/lib/clang/${SLOT}/lib/* ) |
155 |
- [[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}" |
156 |
- [[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}" |
157 |
- |
158 |
- # copy clang over since resource_dir is located relatively to binary |
159 |
- # therefore, we can put our new libraries in it |
160 |
- mkdir -p "${BUILD_DIR}"/lib/{llvm/${CLANG_SLOT}/{bin,$(get_libdir)},clang/${SLOT}/include} || die |
161 |
- cp "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/bin/clang{,++} \ |
162 |
- "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/bin/ || die |
163 |
- cp "${EPREFIX}"/usr/lib/clang/${SLOT}/include/*.h \ |
164 |
- "${BUILD_DIR}"/lib/clang/${SLOT}/include/ || die |
165 |
- cp "${sys_dir}"/*builtins*.a \ |
166 |
- "${BUILD_DIR}/lib/clang/${SLOT}/lib/${sys_dir##*/}/" || die |
167 |
- # we also need LLVMgold.so for gold-based tests |
168 |
- if [[ -f ${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so ]]; then |
169 |
- ln -s "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so \ |
170 |
- "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/$(get_libdir)/ || die |
171 |
- fi |
172 |
- fi |
173 |
-} |
174 |
- |
175 |
-src_test() { |
176 |
- # respect TMPDIR! |
177 |
- local -x LIT_PRESERVES_TMP=1 |
178 |
- # disable sandbox to have it stop clobbering LD_PRELOAD |
179 |
- local -x SANDBOX_ON=0 |
180 |
- # wipe LD_PRELOAD to make ASAN happy |
181 |
- local -x LD_PRELOAD= |
182 |
- |
183 |
- cmake_build check-all |
184 |
-} |
185 |
|
186 |
diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-11.0.0_rc4.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-11.0.0_rc4.ebuild |
187 |
deleted file mode 100644 |
188 |
index cecd595ac6c..00000000000 |
189 |
--- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-11.0.0_rc4.ebuild |
190 |
+++ /dev/null |
191 |
@@ -1,148 +0,0 @@ |
192 |
-# Copyright 1999-2020 Gentoo Authors |
193 |
-# Distributed under the terms of the GNU General Public License v2 |
194 |
- |
195 |
-EAPI=7 |
196 |
- |
197 |
-PYTHON_COMPAT=( python3_{6..9} ) |
198 |
-inherit check-reqs cmake flag-o-matic llvm llvm.org python-any-r1 |
199 |
- |
200 |
-DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)" |
201 |
-HOMEPAGE="https://llvm.org/" |
202 |
-LLVM_COMPONENTS=( compiler-rt ) |
203 |
-LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support llvm/utils/unittest ) |
204 |
-llvm.org_set_globals |
205 |
- |
206 |
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" |
207 |
-SLOT="$(ver_cut 1-3)" |
208 |
-KEYWORDS="" |
209 |
-IUSE="+clang +libfuzzer +profile +sanitize test +xray elibc_glibc" |
210 |
-# FIXME: libfuzzer does not enable all its necessary dependencies |
211 |
-REQUIRED_USE="libfuzzer? ( || ( sanitize xray ) )" |
212 |
-RESTRICT="!test? ( test ) !clang? ( test )" |
213 |
- |
214 |
-CLANG_SLOT=${SLOT%%.*} |
215 |
-# llvm-6 for new lit options |
216 |
-DEPEND=" |
217 |
- >=sys-devel/llvm-6" |
218 |
-BDEPEND=" |
219 |
- clang? ( sys-devel/clang ) |
220 |
- elibc_glibc? ( net-libs/libtirpc ) |
221 |
- test? ( |
222 |
- !<sys-apps/sandbox-2.13 |
223 |
- $(python_gen_any_dep ">=dev-python/lit-5[\${PYTHON_USEDEP}]") |
224 |
- =sys-devel/clang-${PV%_*}*:${CLANG_SLOT} |
225 |
- sys-libs/compiler-rt:${SLOT} ) |
226 |
- ${PYTHON_DEPS}" |
227 |
- |
228 |
-python_check_deps() { |
229 |
- use test || return 0 |
230 |
- has_version "dev-python/lit[${PYTHON_USEDEP}]" |
231 |
-} |
232 |
- |
233 |
-check_space() { |
234 |
- if use test; then |
235 |
- local CHECKREQS_DISK_BUILD=11G |
236 |
- check-reqs_pkg_pretend |
237 |
- fi |
238 |
-} |
239 |
- |
240 |
-pkg_pretend() { |
241 |
- check_space |
242 |
-} |
243 |
- |
244 |
-pkg_setup() { |
245 |
- check_space |
246 |
- llvm_pkg_setup |
247 |
- python-any-r1_pkg_setup |
248 |
-} |
249 |
- |
250 |
-src_prepare() { |
251 |
- sed -i -e 's:-Werror::' lib/tsan/go/buildgo.sh || die |
252 |
- |
253 |
- llvm.org_src_prepare |
254 |
-} |
255 |
- |
256 |
-src_configure() { |
257 |
- # pre-set since we need to pass it to cmake |
258 |
- BUILD_DIR=${WORKDIR}/compiler-rt_build |
259 |
- |
260 |
- if use clang; then |
261 |
- local -x CC=${CHOST}-clang |
262 |
- local -x CXX=${CHOST}-clang++ |
263 |
- strip-unsupported-flags |
264 |
- fi |
265 |
- |
266 |
- local mycmakeargs=( |
267 |
- -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${SLOT}" |
268 |
- # use a build dir structure consistent with install |
269 |
- # this makes it possible to easily deploy test-friendly clang |
270 |
- -DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${SLOT}" |
271 |
- |
272 |
- -DCOMPILER_RT_INCLUDE_TESTS=$(usex test) |
273 |
- # builtins & crt installed by sys-libs/compiler-rt |
274 |
- -DCOMPILER_RT_BUILD_BUILTINS=OFF |
275 |
- -DCOMPILER_RT_BUILD_CRT=OFF |
276 |
- -DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer) |
277 |
- -DCOMPILER_RT_BUILD_PROFILE=$(usex profile) |
278 |
- -DCOMPILER_RT_BUILD_SANITIZERS=$(usex sanitize) |
279 |
- -DCOMPILER_RT_BUILD_XRAY=$(usex xray) |
280 |
- ) |
281 |
- if use test; then |
282 |
- mycmakeargs+=( |
283 |
- -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" |
284 |
- -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit" |
285 |
- -DLLVM_LIT_ARGS="$(get_lit_flags)" |
286 |
- |
287 |
- # they are created during src_test() |
288 |
- -DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang" |
289 |
- -DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang++" |
290 |
- ) |
291 |
- |
292 |
- # same flags are passed for build & tests, so we need to strip |
293 |
- # them down to a subset supported by clang |
294 |
- CC=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang \ |
295 |
- CXX=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang++ \ |
296 |
- strip-unsupported-flags |
297 |
- fi |
298 |
- |
299 |
- if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then |
300 |
- mycmakeargs+=( |
301 |
- # disable use of SDK for the system itself |
302 |
- -DDARWIN_macosx_CACHED_SYSROOT=/ |
303 |
- ) |
304 |
- fi |
305 |
- |
306 |
- cmake_src_configure |
307 |
- |
308 |
- if use test; then |
309 |
- local sys_dir=( "${EPREFIX}"/usr/lib/clang/${SLOT}/lib/* ) |
310 |
- [[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}" |
311 |
- [[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}" |
312 |
- |
313 |
- # copy clang over since resource_dir is located relatively to binary |
314 |
- # therefore, we can put our new libraries in it |
315 |
- mkdir -p "${BUILD_DIR}"/lib/{llvm/${CLANG_SLOT}/{bin,$(get_libdir)},clang/${SLOT}/include} || die |
316 |
- cp "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/bin/clang{,++} \ |
317 |
- "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/bin/ || die |
318 |
- cp "${EPREFIX}"/usr/lib/clang/${SLOT}/include/*.h \ |
319 |
- "${BUILD_DIR}"/lib/clang/${SLOT}/include/ || die |
320 |
- cp "${sys_dir}"/*builtins*.a \ |
321 |
- "${BUILD_DIR}/lib/clang/${SLOT}/lib/${sys_dir##*/}/" || die |
322 |
- # we also need LLVMgold.so for gold-based tests |
323 |
- if [[ -f ${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so ]]; then |
324 |
- ln -s "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so \ |
325 |
- "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/$(get_libdir)/ || die |
326 |
- fi |
327 |
- fi |
328 |
-} |
329 |
- |
330 |
-src_test() { |
331 |
- # respect TMPDIR! |
332 |
- local -x LIT_PRESERVES_TMP=1 |
333 |
- # disable sandbox to have it stop clobbering LD_PRELOAD |
334 |
- local -x SANDBOX_ON=0 |
335 |
- # wipe LD_PRELOAD to make ASAN happy |
336 |
- local -x LD_PRELOAD= |
337 |
- |
338 |
- cmake_build check-all |
339 |
-} |
340 |
|
341 |
diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-11.0.0_rc6.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-11.0.0_rc6.ebuild |
342 |
deleted file mode 100644 |
343 |
index cecd595ac6c..00000000000 |
344 |
--- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-11.0.0_rc6.ebuild |
345 |
+++ /dev/null |
346 |
@@ -1,148 +0,0 @@ |
347 |
-# Copyright 1999-2020 Gentoo Authors |
348 |
-# Distributed under the terms of the GNU General Public License v2 |
349 |
- |
350 |
-EAPI=7 |
351 |
- |
352 |
-PYTHON_COMPAT=( python3_{6..9} ) |
353 |
-inherit check-reqs cmake flag-o-matic llvm llvm.org python-any-r1 |
354 |
- |
355 |
-DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)" |
356 |
-HOMEPAGE="https://llvm.org/" |
357 |
-LLVM_COMPONENTS=( compiler-rt ) |
358 |
-LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support llvm/utils/unittest ) |
359 |
-llvm.org_set_globals |
360 |
- |
361 |
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" |
362 |
-SLOT="$(ver_cut 1-3)" |
363 |
-KEYWORDS="" |
364 |
-IUSE="+clang +libfuzzer +profile +sanitize test +xray elibc_glibc" |
365 |
-# FIXME: libfuzzer does not enable all its necessary dependencies |
366 |
-REQUIRED_USE="libfuzzer? ( || ( sanitize xray ) )" |
367 |
-RESTRICT="!test? ( test ) !clang? ( test )" |
368 |
- |
369 |
-CLANG_SLOT=${SLOT%%.*} |
370 |
-# llvm-6 for new lit options |
371 |
-DEPEND=" |
372 |
- >=sys-devel/llvm-6" |
373 |
-BDEPEND=" |
374 |
- clang? ( sys-devel/clang ) |
375 |
- elibc_glibc? ( net-libs/libtirpc ) |
376 |
- test? ( |
377 |
- !<sys-apps/sandbox-2.13 |
378 |
- $(python_gen_any_dep ">=dev-python/lit-5[\${PYTHON_USEDEP}]") |
379 |
- =sys-devel/clang-${PV%_*}*:${CLANG_SLOT} |
380 |
- sys-libs/compiler-rt:${SLOT} ) |
381 |
- ${PYTHON_DEPS}" |
382 |
- |
383 |
-python_check_deps() { |
384 |
- use test || return 0 |
385 |
- has_version "dev-python/lit[${PYTHON_USEDEP}]" |
386 |
-} |
387 |
- |
388 |
-check_space() { |
389 |
- if use test; then |
390 |
- local CHECKREQS_DISK_BUILD=11G |
391 |
- check-reqs_pkg_pretend |
392 |
- fi |
393 |
-} |
394 |
- |
395 |
-pkg_pretend() { |
396 |
- check_space |
397 |
-} |
398 |
- |
399 |
-pkg_setup() { |
400 |
- check_space |
401 |
- llvm_pkg_setup |
402 |
- python-any-r1_pkg_setup |
403 |
-} |
404 |
- |
405 |
-src_prepare() { |
406 |
- sed -i -e 's:-Werror::' lib/tsan/go/buildgo.sh || die |
407 |
- |
408 |
- llvm.org_src_prepare |
409 |
-} |
410 |
- |
411 |
-src_configure() { |
412 |
- # pre-set since we need to pass it to cmake |
413 |
- BUILD_DIR=${WORKDIR}/compiler-rt_build |
414 |
- |
415 |
- if use clang; then |
416 |
- local -x CC=${CHOST}-clang |
417 |
- local -x CXX=${CHOST}-clang++ |
418 |
- strip-unsupported-flags |
419 |
- fi |
420 |
- |
421 |
- local mycmakeargs=( |
422 |
- -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${SLOT}" |
423 |
- # use a build dir structure consistent with install |
424 |
- # this makes it possible to easily deploy test-friendly clang |
425 |
- -DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${SLOT}" |
426 |
- |
427 |
- -DCOMPILER_RT_INCLUDE_TESTS=$(usex test) |
428 |
- # builtins & crt installed by sys-libs/compiler-rt |
429 |
- -DCOMPILER_RT_BUILD_BUILTINS=OFF |
430 |
- -DCOMPILER_RT_BUILD_CRT=OFF |
431 |
- -DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer) |
432 |
- -DCOMPILER_RT_BUILD_PROFILE=$(usex profile) |
433 |
- -DCOMPILER_RT_BUILD_SANITIZERS=$(usex sanitize) |
434 |
- -DCOMPILER_RT_BUILD_XRAY=$(usex xray) |
435 |
- ) |
436 |
- if use test; then |
437 |
- mycmakeargs+=( |
438 |
- -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" |
439 |
- -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit" |
440 |
- -DLLVM_LIT_ARGS="$(get_lit_flags)" |
441 |
- |
442 |
- # they are created during src_test() |
443 |
- -DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang" |
444 |
- -DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang++" |
445 |
- ) |
446 |
- |
447 |
- # same flags are passed for build & tests, so we need to strip |
448 |
- # them down to a subset supported by clang |
449 |
- CC=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang \ |
450 |
- CXX=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang++ \ |
451 |
- strip-unsupported-flags |
452 |
- fi |
453 |
- |
454 |
- if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then |
455 |
- mycmakeargs+=( |
456 |
- # disable use of SDK for the system itself |
457 |
- -DDARWIN_macosx_CACHED_SYSROOT=/ |
458 |
- ) |
459 |
- fi |
460 |
- |
461 |
- cmake_src_configure |
462 |
- |
463 |
- if use test; then |
464 |
- local sys_dir=( "${EPREFIX}"/usr/lib/clang/${SLOT}/lib/* ) |
465 |
- [[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}" |
466 |
- [[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}" |
467 |
- |
468 |
- # copy clang over since resource_dir is located relatively to binary |
469 |
- # therefore, we can put our new libraries in it |
470 |
- mkdir -p "${BUILD_DIR}"/lib/{llvm/${CLANG_SLOT}/{bin,$(get_libdir)},clang/${SLOT}/include} || die |
471 |
- cp "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/bin/clang{,++} \ |
472 |
- "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/bin/ || die |
473 |
- cp "${EPREFIX}"/usr/lib/clang/${SLOT}/include/*.h \ |
474 |
- "${BUILD_DIR}"/lib/clang/${SLOT}/include/ || die |
475 |
- cp "${sys_dir}"/*builtins*.a \ |
476 |
- "${BUILD_DIR}/lib/clang/${SLOT}/lib/${sys_dir##*/}/" || die |
477 |
- # we also need LLVMgold.so for gold-based tests |
478 |
- if [[ -f ${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so ]]; then |
479 |
- ln -s "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so \ |
480 |
- "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/$(get_libdir)/ || die |
481 |
- fi |
482 |
- fi |
483 |
-} |
484 |
- |
485 |
-src_test() { |
486 |
- # respect TMPDIR! |
487 |
- local -x LIT_PRESERVES_TMP=1 |
488 |
- # disable sandbox to have it stop clobbering LD_PRELOAD |
489 |
- local -x SANDBOX_ON=0 |
490 |
- # wipe LD_PRELOAD to make ASAN happy |
491 |
- local -x LD_PRELOAD= |
492 |
- |
493 |
- cmake_build check-all |
494 |
-} |