summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2016-08-21 11:43:45 +0200
committerMichał Górny <mgorny@gentoo.org>2016-08-22 17:11:48 +0200
commit1d2ecacd2d5c7b5b7a7169722b43d5a107844707 (patch)
treebb98f57fd9f34e976b946b1e9588a7a64098408b /sys-libs/compiler-rt
parentsys-devel/llvm: Strip external projects off the live ebuild (diff)
downloadgentoo-1d2ecacd2d5c7b5b7a7169722b43d5a107844707.tar.gz
gentoo-1d2ecacd2d5c7b5b7a7169722b43d5a107844707.tar.bz2
gentoo-1d2ecacd2d5c7b5b7a7169722b43d5a107844707.zip
sys-libs/compiler-rt: Add a stand-alone ebuild for compiler-rt
Diffstat (limited to 'sys-libs/compiler-rt')
-rw-r--r--sys-libs/compiler-rt/compiler-rt-9999.ebuild53
-rw-r--r--sys-libs/compiler-rt/metadata.xml10
2 files changed, 63 insertions, 0 deletions
diff --git a/sys-libs/compiler-rt/compiler-rt-9999.ebuild b/sys-libs/compiler-rt/compiler-rt-9999.ebuild
new file mode 100644
index 000000000000..7c93672c10f7
--- /dev/null
+++ b/sys-libs/compiler-rt/compiler-rt-9999.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+: ${CMAKE_MAKEFILE_GENERATOR:=ninja}
+CMAKE_MIN_VERSION=3.4.3
+PYTHON_COMPAT=( python2_7 )
+
+inherit cmake-utils git-r3 python-single-r1
+
+DESCRIPTION="Compiler runtime libraries for clang"
+HOMEPAGE="http://llvm.org/"
+SRC_URI=""
+EGIT_REPO_URI="http://llvm.org/git/compiler-rt.git
+ https://github.com/llvm-mirror/compiler-rt.git"
+
+LICENSE="UoI-NCSA"
+SLOT="0/${PV%.*}"
+KEYWORDS=""
+IUSE="+sanitize"
+
+RDEPEND="
+ ~sys-devel/llvm-${PV}
+ !<sys-devel/llvm-${PV}
+ sanitize? ( ${PYTHON_DEPS} )"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}"
+
+REQUIRED_USE=${PYTHON_REQUIRED_USE}
+
+src_configure() {
+ local clang_version=4.0.0
+ local libdir=$(get_libdir)
+ local mycmakeargs=(
+ # used to find cmake modules
+ -DLLVM_LIBDIR_SUFFIX="${libdir#lib}"
+ -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${clang_version}"
+
+ # TODO: tests do not support standalone builds
+ -DCOMPILER_RT_INCLUDE_TESTS=OFF
+ -DCOMPILER_RT_BUILD_SANITIZERS=$(usex sanitize)
+ )
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ use sanitize && python_doscript "${S}"/lib/asan/scripts/asan_symbolize.py
+}
diff --git a/sys-libs/compiler-rt/metadata.xml b/sys-libs/compiler-rt/metadata.xml
new file mode 100644
index 000000000000..ea472dc6c742
--- /dev/null
+++ b/sys-libs/compiler-rt/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>llvm@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="sanitize">Build compiler-rt's sanitizers</flag>
+ </use>
+</pkgmetadata>