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, 15 Aug 2018 20:44:26
Message-Id: 1534365144.7095e7afb520000db26121f8c213e5a6391bc728.mgorny@gentoo
1 commit: 7095e7afb520000db26121f8c213e5a6391bc728
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Wed Aug 15 20:32:24 2018 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Wed Aug 15 20:32:24 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7095e7af
7
8 sys-libs/compiler-rt-sanitizers: Drop 6.0.9999
9
10 .../compiler-rt-sanitizers-6.0.9999.ebuild | 171 ---------------------
11 1 file changed, 171 deletions(-)
12
13 diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-6.0.9999.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-6.0.9999.ebuild
14 deleted file mode 100644
15 index 9f822a78eb3..00000000000
16 --- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-6.0.9999.ebuild
17 +++ /dev/null
18 @@ -1,171 +0,0 @@
19 -# Copyright 1999-2018 Gentoo Foundation
20 -# Distributed under the terms of the GNU General Public License v2
21 -
22 -EAPI=6
23 -
24 -: ${CMAKE_MAKEFILE_GENERATOR:=ninja}
25 -# (needed due to CMAKE_BUILD_TYPE != Gentoo)
26 -CMAKE_MIN_VERSION=3.7.0-r1
27 -PYTHON_COMPAT=( python2_7 )
28 -
29 -inherit check-reqs cmake-utils flag-o-matic git-r3 llvm \
30 - multiprocessing python-any-r1
31 -
32 -DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
33 -HOMEPAGE="https://llvm.org/"
34 -SRC_URI=""
35 -EGIT_REPO_URI="https://git.llvm.org/git/compiler-rt.git
36 - https://github.com/llvm-mirror/compiler-rt.git"
37 -EGIT_BRANCH="release_60"
38 -
39 -LICENSE="|| ( UoI-NCSA MIT )"
40 -# Note: this needs to be updated to match version of clang-9999
41 -SLOT="6.0.1"
42 -KEYWORDS=""
43 -IUSE="+clang test elibc_glibc"
44 -RESTRICT="!test? ( test ) !clang? ( test )"
45 -
46 -CLANG_SLOT=${SLOT%%.*}
47 -# llvm-6 for new lit options
48 -DEPEND="
49 - >=sys-devel/llvm-6
50 - clang? ( sys-devel/clang )
51 - test? (
52 - !<sys-apps/sandbox-2.13
53 - $(python_gen_any_dep ">=dev-python/lit-5[\${PYTHON_USEDEP}]")
54 - =sys-devel/clang-${PV%_*}*:${CLANG_SLOT}
55 - sys-libs/compiler-rt:${SLOT} )
56 - ${PYTHON_DEPS}"
57 -
58 -# least intrusive of all
59 -CMAKE_BUILD_TYPE=RelWithDebInfo
60 -
61 -check_space() {
62 - if use test; then
63 - local CHECKREQS_DISK_BUILD=11G
64 - check-reqs_pkg_pretend
65 - fi
66 -}
67 -
68 -pkg_pretend() {
69 - check_space
70 -}
71 -
72 -pkg_setup() {
73 - check_space
74 - llvm_pkg_setup
75 - python-any-r1_pkg_setup
76 -}
77 -
78 -src_unpack() {
79 - if use test; then
80 - # needed for patched gtest
81 - git-r3_fetch "https://git.llvm.org/git/llvm.git
82 - https://github.com/llvm-mirror/llvm.git"
83 - fi
84 - git-r3_fetch
85 -
86 - if use test; then
87 - git-r3_checkout https://llvm.org/git/llvm.git \
88 - "${WORKDIR}"/llvm '' utils/unittest
89 - fi
90 - git-r3_checkout
91 -}
92 -
93 -src_prepare() {
94 - cmake-utils_src_prepare
95 -
96 - if use test; then
97 - # remove tests that are broken by new glibc
98 - # https://bugs.llvm.org/show_bug.cgi?id=36065
99 - if use elibc_glibc && has_version '>=sys-libs/glibc-2.25'; then
100 - rm test/lsan/TestCases/Linux/use_tls_dynamic.cc || die
101 - rm test/msan/dtls_test.c || die
102 - rm test/sanitizer_common/TestCases/Posix/sanitizer_set_death_callback_test.cc || die
103 - fi
104 - fi
105 -}
106 -
107 -src_configure() {
108 - # pre-set since we need to pass it to cmake
109 - BUILD_DIR=${WORKDIR}/${P}_build
110 -
111 - if use clang; then
112 - local -x CC=${CHOST}-clang
113 - local -x CXX=${CHOST}-clang++
114 - strip-unsupported-flags
115 - fi
116 -
117 - local mycmakeargs=(
118 - -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${SLOT}"
119 - # use a build dir structure consistent with install
120 - # this makes it possible to easily deploy test-friendly clang
121 - -DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${SLOT}"
122 -
123 - -DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
124 - # built-ins installed by sys-libs/compiler-rt
125 - -DCOMPILER_RT_BUILD_BUILTINS=OFF
126 - -DCOMPILER_RT_BUILD_LIBFUZZER=ON
127 - -DCOMPILER_RT_BUILD_PROFILE=ON
128 - -DCOMPILER_RT_BUILD_SANITIZERS=ON
129 - -DCOMPILER_RT_BUILD_XRAY=ON
130 - )
131 - if use test; then
132 - mycmakeargs+=(
133 - -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
134 - -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
135 - -DLLVM_LIT_ARGS="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}"
136 -
137 - # they are created during src_test()
138 - -DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang"
139 - -DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang++"
140 - )
141 -
142 - # same flags are passed for build & tests, so we need to strip
143 - # them down to a subset supported by clang
144 - CC=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang \
145 - CXX=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang++ \
146 - strip-unsupported-flags
147 - fi
148 -
149 - if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
150 - mycmakeargs+=(
151 - # disable use of SDK for the system itself
152 - -DDARWIN_macosx_CACHED_SYSROOT=/
153 - )
154 - fi
155 -
156 - cmake-utils_src_configure
157 -
158 - if use test; then
159 - local sys_dir=( "${EPREFIX}"/usr/lib/clang/${SLOT}/lib/* )
160 - [[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}"
161 - [[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}"
162 -
163 - # copy clang over since resource_dir is located relatively to binary
164 - # therefore, we can put our new libraries in it
165 - mkdir -p "${BUILD_DIR}"/lib/{llvm/${CLANG_SLOT}/{bin,$(get_libdir)},clang/${SLOT}/include} || die
166 - cp "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/bin/clang{,++} \
167 - "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/bin/ || die
168 - cp "${EPREFIX}"/usr/lib/clang/${SLOT}/include/*.h \
169 - "${BUILD_DIR}"/lib/clang/${SLOT}/include/ || die
170 - cp "${sys_dir}"/*builtins*.a \
171 - "${BUILD_DIR}/lib/clang/${SLOT}/lib/${sys_dir##*/}/" || die
172 - # we also need LLVMgold.so for gold-based tests
173 - if [[ -f ${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so ]]; then
174 - ln -s "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so \
175 - "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/$(get_libdir)/ || die
176 - fi
177 - fi
178 -}
179 -
180 -src_test() {
181 - # respect TMPDIR!
182 - local -x LIT_PRESERVES_TMP=1
183 - # disable sandbox to have it stop clobbering LD_PRELOAD
184 - local -x SANDBOX_ON=0
185 - # wipe LD_PRELOAD to make ASAN happy
186 - local -x LD_PRELOAD=
187 -
188 - cmake-utils_src_make check-all
189 -}