diff options
author | Michał Górny <mgorny@gentoo.org> | 2018-03-15 17:44:56 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2018-03-15 18:33:53 +0100 |
commit | d7841372b9eb2a0b14c378a3b1d20eaee337df55 (patch) | |
tree | 160f4f10d62e83954303f54fb5928582b5123799 /sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-5.0.1.ebuild | |
parent | sys-kernel/vanilla-sources: Version bump to 4.15.10 (diff) | |
download | gentoo-d7841372b9eb2a0b14c378a3b1d20eaee337df55.tar.gz gentoo-d7841372b9eb2a0b14c378a3b1d20eaee337df55.tar.bz2 gentoo-d7841372b9eb2a0b14c378a3b1d20eaee337df55.zip |
sys-libs/compiler-rt-sanitizers: Backport USE=clang to older versions
Diffstat (limited to 'sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-5.0.1.ebuild')
-rw-r--r-- | sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-5.0.1.ebuild | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-5.0.1.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-5.0.1.ebuild index 686e223817fb..768c64155d0a 100644 --- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-5.0.1.ebuild +++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-5.0.1.ebuild @@ -21,12 +21,13 @@ SRC_URI="https://releases.llvm.org/${PV/_//}/${MY_P}.tar.xz LICENSE="|| ( UoI-NCSA MIT )" SLOT="${PV%_*}" KEYWORDS="amd64 ~arm64 x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos" -IUSE="test" +IUSE="+clang test" LLVM_MAX_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}]") @@ -72,6 +73,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 |