commit:     c3db0f88fca16c72a0c8503260f6fdf9574cfc9f
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 14 14:51:21 2017 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Jan 14 18:12:33 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c3db0f88

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.

 sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9999.ebuild | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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 6b075cd..c933e53 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

Reply via email to