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-libs/compiler-rt-sanitizers/
Date: Wed, 13 Mar 2019 08:22:33
Message-Id: 1552463396.8c10a4bf6e6be79ad50d5ce22e9318d19f650417.mgorny@gentoo
1 commit: 8c10a4bf6e6be79ad50d5ce22e9318d19f650417
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Wed Mar 13 07:49:56 2019 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Wed Mar 13 07:49:56 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8c10a4bf
7
8 sys-libs/compiler-rt-sanitizers: Remove 8.0.0rc[23]
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 sys-libs/compiler-rt-sanitizers/Manifest | 4 -
13 .../compiler-rt-sanitizers-8.0.0_rc2.ebuild | 171 ---------------------
14 .../compiler-rt-sanitizers-8.0.0_rc3.ebuild | 171 ---------------------
15 3 files changed, 346 deletions(-)
16
17 diff --git a/sys-libs/compiler-rt-sanitizers/Manifest b/sys-libs/compiler-rt-sanitizers/Manifest
18 index 1e6d7672953..545d30ac043 100644
19 --- a/sys-libs/compiler-rt-sanitizers/Manifest
20 +++ b/sys-libs/compiler-rt-sanitizers/Manifest
21 @@ -2,8 +2,6 @@ DIST compiler-rt-4.0.1.src.tar.xz 1434100 BLAKE2B ca6bf78fc07f387b7244a52ef648b0
22 DIST compiler-rt-5.0.2.src.tar.xz 1543256 BLAKE2B 09fa84b8f3e9b8627a14387bc6eaa3d6b4588b9c8f1ac5a0114135fd830e3d45922408b237866789eb81bf38defde1186e0f7430a69f825bee12776b7cd9f74e SHA512 605a6d064877a860d6c9097e0220896dfceafed0a2392ad495c97aa347b97899d89f7e21932e29d3274f396615837414a3e730a915fe4f53eaa858ce3642a666
23 DIST compiler-rt-6.0.1.src.tar.xz 1686820 BLAKE2B 59fa3f6e478bd4d6dfa056c85dcdc4349cbce7cea7fc56519feddc9d66c88c9ca48bad7967432ceb81d754213577f12707035afd827cf630a58627575b73b798 SHA512 69850c1ad92c66977fa217cbfb42a6a3f502fbe3d1a08daa7fc4cfeb617a7736d231f8ad8d93b10b1ae29bd753315d2a2d70f9ff1f4d18a9a7cc81758d91f963
24 DIST compiler-rt-7.0.1.src.tar.xz 1864520 BLAKE2B 14f72aad4379387f4212fb5efef3456cb5e8a03c7a91f98de2368e9b5ff2d02aeaed05da4fba6978b9e4e8698eb34c9c0c4c2df8d43b8c11e8e9d65079c7fa41 SHA512 b94a2a1fb9a6d587cef59b04b951628747bb35bdbcb67de8825aad402a2ba875916a347eef7a9575ac27264e8372e2d67cd477fe2d750c0ed3ce7d67bbbc7dba
25 -DIST compiler-rt-8.0.0rc2.src.tar.xz 1902996 BLAKE2B e1f0046d130a9214ddf00cdb50e303316b9207eb8df946872992dd28b9fa89505e0c136104d372ea95305c1a9e9ff802cae7781c73bea53ac92378032986689c SHA512 49a34055a27efcee9fca1c0a50fe9061ae09945174a9076f76fce001621a3f8fa177ca0356313087a6d2b949d1d5149714036e89790868b984949721ce646685
26 -DIST compiler-rt-8.0.0rc3.src.tar.xz 1904692 BLAKE2B 94faa29c6fc963da2cec5196547bf9814d94d4be45efdb0c057744b51055a8c0ab871cfab13bb21567f614d8da461398f35f8a7cf75475b925ffc4b2787f1683 SHA512 b40c4cae673c45763e722f32faf2db810591b92b1eb7ca46214f3686c2c96106d3eb4962f6ed4d340666502216994589269661f2169fc8f7044f0423d22c380f
27 DIST compiler-rt-8.0.0rc5.src.tar.xz 1902880 BLAKE2B ef8a3eeb58845032f332cc3e0eed4ca33166450ef0ebf21d00fa6f0068ff61a3af54bddb696c9ab507c909baa5bf53ad1bc218ca5a3a354a021315fd6ad1b6b5 SHA512 6d7e520e2b16e097b35fcfce1637160ce8b3a174ef79b7c56e4fae466aef9dafc45f577de590426637f9950bbb2f0c18213cea90e566b05f4f6251e4e5de0dca
28 DIST compiler-rt-sanitizers-4.0.1-patchset.tar.xz 2384 BLAKE2B 6f9eee711c83570767f0bb634d0f91c18ee7f2af93a478938b8d5b6ce6f2c2fbaadb7bd5c7ee94a14dc1834359a046187db6bc7005b7c2efa539325dc0701ad9 SHA512 72d7357b4c27bbf8fa8b34803ddea905a9f1054e8fc7bf99a4ead9dc00408989ea2709f04be9cf45a27eeb4b9386c89feeb25b53a84f3cac9739196b89813887
29 DIST compiler-rt-sanitizers-6.0.1-patchset.tar.xz 8820 BLAKE2B d53ca357e060d058c7f20c51e74684f4c032fdf3ccec4c9f227dc7a5757206f331b9eda25a72c5c66faf4c44b2cc63eb439bd21bdd55d37a93918ab428fd7cd4 SHA512 782a34c56134bd061da30c1f598ddb9e90cb34a4e4ef058fa9634f6da372fd8693ff5e6cf98b59700942273240f83052b89ee2736b22f4e19bc8b519fbec8cad
30 @@ -11,6 +9,4 @@ DIST llvm-4.0.1.src.tar.xz 21065652 BLAKE2B 6327eed2d1feb108440f22d2581d1ff86c10
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 -DIST llvm-8.0.0rc3.src.tar.xz 30507604 BLAKE2B c9baaca537d292af9f12368df86090750508113eb7db393fe44c1ba7579df947f0a7092e6ddd4403bda9f9ed75fe8c049f3baf6d8671faa0c91e3267c584893a SHA512 82199841c2084cffe4e86b4f2d5ebe404059196f1f6d000ee69cfddba05d78c4500ad7499615fa67e9774ead6cba5a23db484dd85f752c8d08e8067f7d7b98ca
36 DIST llvm-8.0.0rc5.src.tar.xz 30507432 BLAKE2B 3f20c3dc270439a32fe23e403ca5190e624f329a10d424d15475d32d89725b021f12af19845928da41be4b83afd254df1f6d27f235b0d2ab81ff76d9e588250f SHA512 b015bab2f0b0644d9fab295dee5d3b2a4d4d7c9d5870a06d7829f43d61e92aeb31b28d4c074f6a20ad803dde06399ef3298c951f1580b010f4b756f75bb4453b
37
38 diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-8.0.0_rc2.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-8.0.0_rc2.ebuild
39 deleted file mode 100644
40 index d1c8f9787e0..00000000000
41 --- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-8.0.0_rc2.ebuild
42 +++ /dev/null
43 @@ -1,171 +0,0 @@
44 -# Copyright 1999-2019 Gentoo Authors
45 -# Distributed under the terms of the GNU General Public License v2
46 -
47 -EAPI=6
48 -
49 -: ${CMAKE_MAKEFILE_GENERATOR:=ninja}
50 -# (needed due to CMAKE_BUILD_TYPE != Gentoo)
51 -CMAKE_MIN_VERSION=3.7.0-r1
52 -PYTHON_COMPAT=( python2_7 )
53 -
54 -inherit check-reqs cmake-utils flag-o-matic llvm \
55 - multiprocessing python-any-r1
56 -
57 -MY_P=compiler-rt-${PV/_/}.src
58 -LLVM_P=llvm-${PV/_/}.src
59 -
60 -DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
61 -HOMEPAGE="https://llvm.org/"
62 -SRC_URI="https://prereleases.llvm.org/${PV/_//}/${MY_P}.tar.xz
63 - test? ( https://prereleases.llvm.org/${PV/_//}/${LLVM_P}.tar.xz )"
64 -
65 -LICENSE="|| ( UoI-NCSA MIT )"
66 -SLOT="${PV%_*}"
67 -KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-fbsd ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos"
68 -IUSE="+clang +libfuzzer +profile +sanitize test +xray elibc_glibc"
69 -# FIXME: libfuzzer does not enable all its necessary dependencies
70 -REQUIRED_USE="libfuzzer? ( || ( sanitize xray ) )"
71 -RESTRICT="!test? ( test ) !clang? ( test )"
72 -
73 -CLANG_SLOT=${SLOT%%.*}
74 -# llvm-6 for new lit options
75 -DEPEND="
76 - >=sys-devel/llvm-6
77 - clang? ( sys-devel/clang )
78 - elibc_glibc? ( net-libs/libtirpc )
79 - test? (
80 - !<sys-apps/sandbox-2.13
81 - $(python_gen_any_dep ">=dev-python/lit-5[\${PYTHON_USEDEP}]")
82 - =sys-devel/clang-${PV%_*}*:${CLANG_SLOT}
83 - sys-libs/compiler-rt:${SLOT} )
84 - ${PYTHON_DEPS}"
85 -
86 -S=${WORKDIR}/${MY_P}
87 -
88 -# least intrusive of all
89 -CMAKE_BUILD_TYPE=RelWithDebInfo
90 -
91 -check_space() {
92 - if use test; then
93 - local CHECKREQS_DISK_BUILD=11G
94 - check-reqs_pkg_pretend
95 - fi
96 -}
97 -
98 -pkg_pretend() {
99 - check_space
100 -}
101 -
102 -pkg_setup() {
103 - check_space
104 - llvm_pkg_setup
105 - python-any-r1_pkg_setup
106 -}
107 -
108 -src_unpack() {
109 - einfo "Unpacking ${MY_P}.tar.xz ..."
110 - tar -xf "${DISTDIR}/${MY_P}.tar.xz" || die
111 -
112 - if use test; then
113 - einfo "Unpacking parts of ${LLVM_P}.tar.xz ..."
114 - tar -xf "${DISTDIR}/${LLVM_P}.tar.xz" \
115 - "${LLVM_P}"/utils/unittest || die
116 - mv "${LLVM_P}" llvm || die
117 - fi
118 -}
119 -
120 -src_prepare() {
121 - cmake-utils_src_prepare
122 -
123 - if use test; then
124 - # remove tests that are (still) broken by new glibc
125 - # https://bugs.llvm.org/show_bug.cgi?id=36065
126 - if use elibc_glibc && has_version '>=sys-libs/glibc-2.25'; then
127 - rm test/lsan/TestCases/Linux/fork_and_leak.cc || die
128 - fi
129 - fi
130 -}
131 -
132 -src_configure() {
133 - # pre-set since we need to pass it to cmake
134 - BUILD_DIR=${WORKDIR}/${P}_build
135 -
136 - if use clang; then
137 - local -x CC=${CHOST}-clang
138 - local -x CXX=${CHOST}-clang++
139 - strip-unsupported-flags
140 - fi
141 -
142 - local mycmakeargs=(
143 - -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${SLOT}"
144 - # use a build dir structure consistent with install
145 - # this makes it possible to easily deploy test-friendly clang
146 - -DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${SLOT}"
147 -
148 - -DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
149 - # built-ins installed by sys-libs/compiler-rt
150 - -DCOMPILER_RT_BUILD_BUILTINS=OFF
151 - -DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer)
152 - -DCOMPILER_RT_BUILD_PROFILE=$(usex profile)
153 - -DCOMPILER_RT_BUILD_SANITIZERS=$(usex sanitize)
154 - -DCOMPILER_RT_BUILD_XRAY=$(usex xray)
155 - )
156 - if use test; then
157 - mycmakeargs+=(
158 - -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
159 - -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
160 - -DLLVM_LIT_ARGS="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}"
161 -
162 - # they are created during src_test()
163 - -DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang"
164 - -DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang++"
165 - )
166 -
167 - # same flags are passed for build & tests, so we need to strip
168 - # them down to a subset supported by clang
169 - CC=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang \
170 - CXX=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang++ \
171 - strip-unsupported-flags
172 - fi
173 -
174 - if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
175 - mycmakeargs+=(
176 - # disable use of SDK for the system itself
177 - -DDARWIN_macosx_CACHED_SYSROOT=/
178 - )
179 - fi
180 -
181 - cmake-utils_src_configure
182 -
183 - if use test; then
184 - local sys_dir=( "${EPREFIX}"/usr/lib/clang/${SLOT}/lib/* )
185 - [[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}"
186 - [[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}"
187 -
188 - # copy clang over since resource_dir is located relatively to binary
189 - # therefore, we can put our new libraries in it
190 - mkdir -p "${BUILD_DIR}"/lib/{llvm/${CLANG_SLOT}/{bin,$(get_libdir)},clang/${SLOT}/include} || die
191 - cp "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/bin/clang{,++} \
192 - "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/bin/ || die
193 - cp "${EPREFIX}"/usr/lib/clang/${SLOT}/include/*.h \
194 - "${BUILD_DIR}"/lib/clang/${SLOT}/include/ || die
195 - cp "${sys_dir}"/*builtins*.a \
196 - "${BUILD_DIR}/lib/clang/${SLOT}/lib/${sys_dir##*/}/" || die
197 - # we also need LLVMgold.so for gold-based tests
198 - if [[ -f ${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so ]]; then
199 - ln -s "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so \
200 - "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/$(get_libdir)/ || die
201 - fi
202 - fi
203 -}
204 -
205 -src_test() {
206 - # respect TMPDIR!
207 - local -x LIT_PRESERVES_TMP=1
208 - # disable sandbox to have it stop clobbering LD_PRELOAD
209 - local -x SANDBOX_ON=0
210 - # wipe LD_PRELOAD to make ASAN happy
211 - local -x LD_PRELOAD=
212 -
213 - cmake-utils_src_make check-all
214 -}
215
216 diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-8.0.0_rc3.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-8.0.0_rc3.ebuild
217 deleted file mode 100644
218 index d1c8f9787e0..00000000000
219 --- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-8.0.0_rc3.ebuild
220 +++ /dev/null
221 @@ -1,171 +0,0 @@
222 -# Copyright 1999-2019 Gentoo Authors
223 -# Distributed under the terms of the GNU General Public License v2
224 -
225 -EAPI=6
226 -
227 -: ${CMAKE_MAKEFILE_GENERATOR:=ninja}
228 -# (needed due to CMAKE_BUILD_TYPE != Gentoo)
229 -CMAKE_MIN_VERSION=3.7.0-r1
230 -PYTHON_COMPAT=( python2_7 )
231 -
232 -inherit check-reqs cmake-utils flag-o-matic llvm \
233 - multiprocessing python-any-r1
234 -
235 -MY_P=compiler-rt-${PV/_/}.src
236 -LLVM_P=llvm-${PV/_/}.src
237 -
238 -DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
239 -HOMEPAGE="https://llvm.org/"
240 -SRC_URI="https://prereleases.llvm.org/${PV/_//}/${MY_P}.tar.xz
241 - test? ( https://prereleases.llvm.org/${PV/_//}/${LLVM_P}.tar.xz )"
242 -
243 -LICENSE="|| ( UoI-NCSA MIT )"
244 -SLOT="${PV%_*}"
245 -KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-fbsd ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos"
246 -IUSE="+clang +libfuzzer +profile +sanitize test +xray elibc_glibc"
247 -# FIXME: libfuzzer does not enable all its necessary dependencies
248 -REQUIRED_USE="libfuzzer? ( || ( sanitize xray ) )"
249 -RESTRICT="!test? ( test ) !clang? ( test )"
250 -
251 -CLANG_SLOT=${SLOT%%.*}
252 -# llvm-6 for new lit options
253 -DEPEND="
254 - >=sys-devel/llvm-6
255 - clang? ( sys-devel/clang )
256 - elibc_glibc? ( net-libs/libtirpc )
257 - test? (
258 - !<sys-apps/sandbox-2.13
259 - $(python_gen_any_dep ">=dev-python/lit-5[\${PYTHON_USEDEP}]")
260 - =sys-devel/clang-${PV%_*}*:${CLANG_SLOT}
261 - sys-libs/compiler-rt:${SLOT} )
262 - ${PYTHON_DEPS}"
263 -
264 -S=${WORKDIR}/${MY_P}
265 -
266 -# least intrusive of all
267 -CMAKE_BUILD_TYPE=RelWithDebInfo
268 -
269 -check_space() {
270 - if use test; then
271 - local CHECKREQS_DISK_BUILD=11G
272 - check-reqs_pkg_pretend
273 - fi
274 -}
275 -
276 -pkg_pretend() {
277 - check_space
278 -}
279 -
280 -pkg_setup() {
281 - check_space
282 - llvm_pkg_setup
283 - python-any-r1_pkg_setup
284 -}
285 -
286 -src_unpack() {
287 - einfo "Unpacking ${MY_P}.tar.xz ..."
288 - tar -xf "${DISTDIR}/${MY_P}.tar.xz" || die
289 -
290 - if use test; then
291 - einfo "Unpacking parts of ${LLVM_P}.tar.xz ..."
292 - tar -xf "${DISTDIR}/${LLVM_P}.tar.xz" \
293 - "${LLVM_P}"/utils/unittest || die
294 - mv "${LLVM_P}" llvm || die
295 - fi
296 -}
297 -
298 -src_prepare() {
299 - cmake-utils_src_prepare
300 -
301 - if use test; then
302 - # remove tests that are (still) broken by new glibc
303 - # https://bugs.llvm.org/show_bug.cgi?id=36065
304 - if use elibc_glibc && has_version '>=sys-libs/glibc-2.25'; then
305 - rm test/lsan/TestCases/Linux/fork_and_leak.cc || die
306 - fi
307 - fi
308 -}
309 -
310 -src_configure() {
311 - # pre-set since we need to pass it to cmake
312 - BUILD_DIR=${WORKDIR}/${P}_build
313 -
314 - if use clang; then
315 - local -x CC=${CHOST}-clang
316 - local -x CXX=${CHOST}-clang++
317 - strip-unsupported-flags
318 - fi
319 -
320 - local mycmakeargs=(
321 - -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${SLOT}"
322 - # use a build dir structure consistent with install
323 - # this makes it possible to easily deploy test-friendly clang
324 - -DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${SLOT}"
325 -
326 - -DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
327 - # built-ins installed by sys-libs/compiler-rt
328 - -DCOMPILER_RT_BUILD_BUILTINS=OFF
329 - -DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer)
330 - -DCOMPILER_RT_BUILD_PROFILE=$(usex profile)
331 - -DCOMPILER_RT_BUILD_SANITIZERS=$(usex sanitize)
332 - -DCOMPILER_RT_BUILD_XRAY=$(usex xray)
333 - )
334 - if use test; then
335 - mycmakeargs+=(
336 - -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
337 - -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
338 - -DLLVM_LIT_ARGS="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}"
339 -
340 - # they are created during src_test()
341 - -DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang"
342 - -DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang++"
343 - )
344 -
345 - # same flags are passed for build & tests, so we need to strip
346 - # them down to a subset supported by clang
347 - CC=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang \
348 - CXX=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang++ \
349 - strip-unsupported-flags
350 - fi
351 -
352 - if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
353 - mycmakeargs+=(
354 - # disable use of SDK for the system itself
355 - -DDARWIN_macosx_CACHED_SYSROOT=/
356 - )
357 - fi
358 -
359 - cmake-utils_src_configure
360 -
361 - if use test; then
362 - local sys_dir=( "${EPREFIX}"/usr/lib/clang/${SLOT}/lib/* )
363 - [[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}"
364 - [[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}"
365 -
366 - # copy clang over since resource_dir is located relatively to binary
367 - # therefore, we can put our new libraries in it
368 - mkdir -p "${BUILD_DIR}"/lib/{llvm/${CLANG_SLOT}/{bin,$(get_libdir)},clang/${SLOT}/include} || die
369 - cp "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/bin/clang{,++} \
370 - "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/bin/ || die
371 - cp "${EPREFIX}"/usr/lib/clang/${SLOT}/include/*.h \
372 - "${BUILD_DIR}"/lib/clang/${SLOT}/include/ || die
373 - cp "${sys_dir}"/*builtins*.a \
374 - "${BUILD_DIR}/lib/clang/${SLOT}/lib/${sys_dir##*/}/" || die
375 - # we also need LLVMgold.so for gold-based tests
376 - if [[ -f ${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so ]]; then
377 - ln -s "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so \
378 - "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/$(get_libdir)/ || die
379 - fi
380 - fi
381 -}
382 -
383 -src_test() {
384 - # respect TMPDIR!
385 - local -x LIT_PRESERVES_TMP=1
386 - # disable sandbox to have it stop clobbering LD_PRELOAD
387 - local -x SANDBOX_ON=0
388 - # wipe LD_PRELOAD to make ASAN happy
389 - local -x LD_PRELOAD=
390 -
391 - cmake-utils_src_make check-all
392 -}