summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2017-01-14 15:51:21 +0100
committerMichał Górny <mgorny@gentoo.org>2017-01-14 19:12:33 +0100
commitc3db0f88fca16c72a0c8503260f6fdf9574cfc9f (patch)
tree43457557e64c256514ced29eceb8995c542d35cf /sys-libs
parentsys-libs/compiler-rt: Obtain version from llvm-config (diff)
downloadgentoo-c3db0f88fca16c72a0c8503260f6fdf9574cfc9f.tar.gz
gentoo-c3db0f88fca16c72a0c8503260f6fdf9574cfc9f.tar.bz2
gentoo-c3db0f88fca16c72a0c8503260f6fdf9574cfc9f.zip
sys-libs/compiler-rt-sanitizers: Obtain version from llvm-config
Obtain the clang version that is used to build paths from llvm-config, instead of hardcoding it in ebuild. This matches the method used in upstream code (obtaining it from CMake files), and works both for release and live ebuilds. It is fine to rely on llvm-config since we need it for LLVM macros anyway.
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9999.ebuild3
1 files changed, 2 insertions, 1 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 6b075cdac023..c933e5339044 100644
--- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9999.ebuild
+++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9999.ebuild
@@ -56,7 +56,8 @@ src_configure() {
# pre-set since we need to pass it to cmake
BUILD_DIR=${WORKDIR}/${P}_build
- local clang_version=4.0.0
+ local llvm_version=$(llvm-config --version) || die
+ local clang_version=$(get_version_component_range 1-3 "${llvm_version}")
local libdir=$(get_libdir)
local mycmakeargs=(
# used to find cmake modules