diff options
Diffstat (limited to 'sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9999.ebuild')
-rw-r--r-- | sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9999.ebuild | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9999.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9999.ebuild index 97b8b578d56f..5821a6f3c0eb 100644 --- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9999.ebuild +++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9999.ebuild @@ -20,13 +20,14 @@ LICENSE="|| ( UoI-NCSA MIT )" # Note: this needs to be updated to match version of clang-9999 SLOT="7.0.0" KEYWORDS="" -IUSE="test" -RESTRICT="!test? ( test )" +IUSE="+clang test" +RESTRICT="!test? ( test ) !clang? ( test )" LLVM_SLOT=${SLOT%%.*} # llvm-4 needed for --cmakedir DEPEND=" >=sys-devel/llvm-4 + clang? ( sys-devel/clang ) test? ( app-portage/unsandbox $(python_gen_any_dep "~dev-python/lit-${PV}[\${PYTHON_USEDEP}]") @@ -73,6 +74,12 @@ src_configure() { # pre-set since we need to pass it to cmake BUILD_DIR=${WORKDIR}/${P}_build + if use clang; then + local -x CC=${CHOST}-clang + local -x CXX=${CHOST}-clang++ + strip-unsupported-flags + fi + local mycmakeargs=( -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${SLOT}" # use a build dir structure consistent with install |