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/
Date: Sat, 01 Oct 2016 19:06:04
Message-Id: 1475348749.ce53179df8d41a6efabdf109750acdea377aca97.mgorny@gentoo
1 commit: ce53179df8d41a6efabdf109750acdea377aca97
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sat Oct 1 15:26:58 2016 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sat Oct 1 19:05:49 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ce53179d
7
8 sys-libs/compiler-rt: Strip sanitizers & xray off to separate pkg
9
10 sys-libs/compiler-rt/compiler-rt-9999.ebuild | 69 +++++-----------------------
11 sys-libs/compiler-rt/metadata.xml | 3 --
12 2 files changed, 11 insertions(+), 61 deletions(-)
13
14 diff --git a/sys-libs/compiler-rt/compiler-rt-9999.ebuild b/sys-libs/compiler-rt/compiler-rt-9999.ebuild
15 index 829757c..751fac9 100644
16 --- a/sys-libs/compiler-rt/compiler-rt-9999.ebuild
17 +++ b/sys-libs/compiler-rt/compiler-rt-9999.ebuild
18 @@ -8,9 +8,10 @@ EAPI=6
19 CMAKE_MIN_VERSION=3.4.3
20 PYTHON_COMPAT=( python2_7 )
21
22 -inherit cmake-utils flag-o-matic git-r3 python-single-r1
23 +# TODO: fix unnecessary dep on Python upstream
24 +inherit cmake-utils flag-o-matic git-r3 python-any-r1
25
26 -DESCRIPTION="Compiler runtime libraries for clang"
27 +DESCRIPTION="Compiler runtime library for clang (built-in part)"
28 HOMEPAGE="http://llvm.org/"
29 SRC_URI=""
30 EGIT_REPO_URI="http://llvm.org/git/compiler-rt.git
31 @@ -19,34 +20,14 @@ EGIT_REPO_URI="http://llvm.org/git/compiler-rt.git
32 LICENSE="UoI-NCSA"
33 SLOT="0/${PV%.*}"
34 KEYWORDS=""
35 -IUSE="+sanitize test"
36 +IUSE=""
37
38 RDEPEND="
39 - !<sys-devel/llvm-${PV}
40 - sanitize? ( ${PYTHON_DEPS} )"
41 + !<sys-devel/llvm-4.0"
42 DEPEND="${RDEPEND}
43 ~sys-devel/llvm-${PV}
44 - test? ( ~sys-devel/clang-${PV} )
45 ${PYTHON_DEPS}"
46
47 -REQUIRED_USE="${PYTHON_REQUIRED_USE}
48 - test? ( sanitize )"
49 -
50 -src_unpack() {
51 - if use test; then
52 - # needed for patched gtest
53 - git-r3_fetch "http://llvm.org/git/llvm.git
54 - https://github.com/llvm-mirror/llvm.git"
55 - fi
56 - git-r3_fetch
57 -
58 - if use test; then
59 - git-r3_checkout http://llvm.org/git/llvm.git \
60 - "${WORKDIR}"/llvm
61 - fi
62 - git-r3_checkout
63 -}
64 -
65 src_configure() {
66 # pre-set since we need to pass it to cmake
67 BUILD_DIR=${WORKDIR}/${P}_build
68 @@ -61,46 +42,18 @@ src_configure() {
69 # this makes it possible to easily deploy test-friendly clang
70 -DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${clang_version}"
71
72 - -DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
73 - -DCOMPILER_RT_BUILD_SANITIZERS=$(usex sanitize)
74 + # currently lit covers only sanitizer tests
75 + -DCOMPILER_RT_INCLUDE_TESTS=OFF
76 + -DCOMPILER_RT_BUILD_SANITIZERS=OFF
77 + -DCOMPILER_RT_BUILD_XRAY=OFF
78 )
79 - if use test; then
80 - mycmakeargs+=(
81 - -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
82 -
83 - # they are created during src_test()
84 - -DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/bin/clang"
85 - -DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/bin/clang++"
86 - )
87 -
88 - # same flags are passed for build & tests, so we need to strip
89 - # them down to a subset supported by clang
90 - filter-flags -msahf -frecord-gcc-switches
91 - fi
92
93 cmake-utils_src_configure
94 -
95 - if use test; then
96 - # copy clang over since resource_dir is located relatively to binary
97 - # therefore, we can put our new libraries in it
98 - mkdir -p "${BUILD_DIR}"/{bin,lib/clang/"${clang_version}"/include} || die
99 - cp "${EPREFIX}/usr/bin/clang" "${EPREFIX}/usr/bin/clang++" \
100 - "${BUILD_DIR}"/bin/ || die
101 - cp "${EPREFIX}/usr/lib/clang/${clang_version}/include"/*.h \
102 - "${BUILD_DIR}/lib/clang/${clang_version}/include/" || die
103 - fi
104 -}
105 -
106 -src_test() {
107 - # sandbox breaks libasan tests... and is hard to kill
108 - # so abuse the fail in its algorithms
109 - local -x LD_PRELOAD=${LD_PRELOAD/libsandbox/nolibsandbox}
110 -
111 - cmake-utils_src_make check-all
112 }
113
114 src_install() {
115 cmake-utils_src_install
116
117 - use sanitize && python_doscript "${S}"/lib/asan/scripts/asan_symbolize.py
118 + # includes are mistakenly installed for all sanitizers and xray
119 + rm -rf "${ED}"usr/lib/clang/*/include || die
120 }
121
122 diff --git a/sys-libs/compiler-rt/metadata.xml b/sys-libs/compiler-rt/metadata.xml
123 index ea472dc..89c4bdb 100644
124 --- a/sys-libs/compiler-rt/metadata.xml
125 +++ b/sys-libs/compiler-rt/metadata.xml
126 @@ -4,7 +4,4 @@
127 <maintainer type="project">
128 <email>llvm@g.o</email>
129 </maintainer>
130 - <use>
131 - <flag name="sanitize">Build compiler-rt's sanitizers</flag>
132 - </use>
133 </pkgmetadata>