sys-libs/compiler-rt-sanitizers: Add explicit flags for components

Bug: https://bugs.gentoo.org/672294
Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
Michał Górny
2018-12-06 19:59:33 +01:00
parent be23ef21ed
commit e9d44197c2
6 changed files with 39 additions and 25 deletions

View File

@@ -23,7 +23,9 @@ SRC_URI="https://releases.llvm.org/${PV/_//}/${MY_P}.tar.xz
LICENSE="|| ( UoI-NCSA MIT )"
SLOT="${PV%_*}"
KEYWORDS="amd64 ~arm64 ~ppc64 x86 ~amd64-fbsd ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos"
IUSE="+clang test elibc_glibc"
IUSE="+clang +libfuzzer +profile +sanitize test +xray elibc_glibc"
# FIXME: libfuzzer does not enable all its necessary dependencies
REQUIRED_USE="libfuzzer? ( || ( sanitize xray ) )"
RESTRICT="!test? ( test ) !clang? ( test )"
CLANG_SLOT=${SLOT%%.*}
@@ -110,10 +112,10 @@ src_configure() {
-DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
# built-ins installed by sys-libs/compiler-rt
-DCOMPILER_RT_BUILD_BUILTINS=OFF
-DCOMPILER_RT_BUILD_LIBFUZZER=ON
-DCOMPILER_RT_BUILD_PROFILE=ON
-DCOMPILER_RT_BUILD_SANITIZERS=ON
-DCOMPILER_RT_BUILD_XRAY=ON
-DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer)
-DCOMPILER_RT_BUILD_PROFILE=$(usex profile)
-DCOMPILER_RT_BUILD_SANITIZERS=$(usex sanitize)
-DCOMPILER_RT_BUILD_XRAY=$(usex xray)
)
if use test; then
mycmakeargs+=(

View File

@@ -22,7 +22,9 @@ SRC_URI="https://releases.llvm.org/${PV/_//}/${MY_P}.tar.xz
LICENSE="|| ( UoI-NCSA MIT )"
SLOT="${PV%_*}"
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-fbsd ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos"
IUSE="+clang test elibc_glibc"
IUSE="+clang +libfuzzer +profile +sanitize test +xray elibc_glibc"
# FIXME: libfuzzer does not enable all its necessary dependencies
REQUIRED_USE="libfuzzer? ( || ( sanitize xray ) )"
RESTRICT="!test? ( test ) !clang? ( test )"
CLANG_SLOT=${SLOT%%.*}
@@ -108,10 +110,10 @@ src_configure() {
-DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
# built-ins installed by sys-libs/compiler-rt
-DCOMPILER_RT_BUILD_BUILTINS=OFF
-DCOMPILER_RT_BUILD_LIBFUZZER=ON
-DCOMPILER_RT_BUILD_PROFILE=ON
-DCOMPILER_RT_BUILD_SANITIZERS=ON
-DCOMPILER_RT_BUILD_XRAY=ON
-DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer)
-DCOMPILER_RT_BUILD_PROFILE=$(usex profile)
-DCOMPILER_RT_BUILD_SANITIZERS=$(usex sanitize)
-DCOMPILER_RT_BUILD_XRAY=$(usex xray)
)
if use test; then
mycmakeargs+=(

View File

@@ -22,7 +22,9 @@ SRC_URI="https://prereleases.llvm.org/${PV/_//}/${MY_P}.tar.xz
LICENSE="|| ( UoI-NCSA MIT )"
SLOT="${PV%_*}"
KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86 ~amd64-fbsd ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos"
IUSE="+clang test elibc_glibc"
IUSE="+clang +libfuzzer +profile +sanitize test +xray elibc_glibc"
# FIXME: libfuzzer does not enable all its necessary dependencies
REQUIRED_USE="libfuzzer? ( || ( sanitize xray ) )"
RESTRICT="!test? ( test ) !clang? ( test )"
CLANG_SLOT=${SLOT%%.*}
@@ -108,10 +110,10 @@ src_configure() {
-DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
# built-ins installed by sys-libs/compiler-rt
-DCOMPILER_RT_BUILD_BUILTINS=OFF
-DCOMPILER_RT_BUILD_LIBFUZZER=ON
-DCOMPILER_RT_BUILD_PROFILE=ON
-DCOMPILER_RT_BUILD_SANITIZERS=ON
-DCOMPILER_RT_BUILD_XRAY=ON
-DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer)
-DCOMPILER_RT_BUILD_PROFILE=$(usex profile)
-DCOMPILER_RT_BUILD_SANITIZERS=$(usex sanitize)
-DCOMPILER_RT_BUILD_XRAY=$(usex xray)
)
if use test; then
mycmakeargs+=(

View File

@@ -22,7 +22,9 @@ LICENSE="|| ( UoI-NCSA MIT )"
# Note: this needs to be updated to match version of clang-9999
SLOT="7.0.1"
KEYWORDS=""
IUSE="+clang test elibc_glibc"
IUSE="+clang +libfuzzer +profile +sanitize test +xray elibc_glibc"
# FIXME: libfuzzer does not enable all its necessary dependencies
REQUIRED_USE="libfuzzer? ( || ( sanitize xray ) )"
RESTRICT="!test? ( test ) !clang? ( test )"
CLANG_SLOT=${SLOT%%.*}
@@ -109,10 +111,10 @@ src_configure() {
-DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
# built-ins installed by sys-libs/compiler-rt
-DCOMPILER_RT_BUILD_BUILTINS=OFF
-DCOMPILER_RT_BUILD_LIBFUZZER=ON
-DCOMPILER_RT_BUILD_PROFILE=ON
-DCOMPILER_RT_BUILD_SANITIZERS=ON
-DCOMPILER_RT_BUILD_XRAY=ON
-DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer)
-DCOMPILER_RT_BUILD_PROFILE=$(usex profile)
-DCOMPILER_RT_BUILD_SANITIZERS=$(usex sanitize)
-DCOMPILER_RT_BUILD_XRAY=$(usex xray)
)
if use test; then
mycmakeargs+=(

View File

@@ -21,7 +21,9 @@ LICENSE="|| ( UoI-NCSA MIT )"
# Note: this needs to be updated to match version of clang-9999
SLOT="8.0.0"
KEYWORDS=""
IUSE="+clang test elibc_glibc"
IUSE="+clang +libfuzzer +profile +sanitize test +xray elibc_glibc"
# FIXME: libfuzzer does not enable all its necessary dependencies
REQUIRED_USE="libfuzzer? ( || ( sanitize xray ) )"
RESTRICT="!test? ( test ) !clang? ( test )"
CLANG_SLOT=${SLOT%%.*}
@@ -108,10 +110,10 @@ src_configure() {
-DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
# built-ins installed by sys-libs/compiler-rt
-DCOMPILER_RT_BUILD_BUILTINS=OFF
-DCOMPILER_RT_BUILD_LIBFUZZER=ON
-DCOMPILER_RT_BUILD_PROFILE=ON
-DCOMPILER_RT_BUILD_SANITIZERS=ON
-DCOMPILER_RT_BUILD_XRAY=ON
-DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer)
-DCOMPILER_RT_BUILD_PROFILE=$(usex profile)
-DCOMPILER_RT_BUILD_SANITIZERS=$(usex sanitize)
-DCOMPILER_RT_BUILD_XRAY=$(usex xray)
)
if use test; then
mycmakeargs+=(

View File

@@ -7,5 +7,9 @@
<use>
<flag name='clang'>Force building using installed clang (rather
than the default CC/CXX).</flag>
<flag name='libfuzzer'>Build fuzzing runtime.</flag>
<flag name='profile'>Build profiling runtime.</flag>
<flag name='sanitize'>Build sanitizer runtimes.</flag>
<flag name='xray'>Build XRay runtime.</flag>
</use>
</pkgmetadata>