summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2017-01-14 15:47:59 +0100
committerMichał Górny <mgorny@gentoo.org>2017-01-14 19:12:31 +0100
commite5b63fc32ca82454b18b8687cc08a723431a8c27 (patch)
treea3c58663a9151b094528d6af9ea1be22d6018e8e /sys-libs
parentsys-devel/clang: Obtain version from llvm-config (diff)
downloadgentoo-e5b63fc32ca82454b18b8687cc08a723431a8c27.tar.gz
gentoo-e5b63fc32ca82454b18b8687cc08a723431a8c27.tar.bz2
gentoo-e5b63fc32ca82454b18b8687cc08a723431a8c27.zip
sys-libs/compiler-rt: 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/compiler-rt-9999.ebuild6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys-libs/compiler-rt/compiler-rt-9999.ebuild b/sys-libs/compiler-rt/compiler-rt-9999.ebuild
index 8f44cb9eb1c5..fd1f907da74d 100644
--- a/sys-libs/compiler-rt/compiler-rt-9999.ebuild
+++ b/sys-libs/compiler-rt/compiler-rt-9999.ebuild
@@ -50,7 +50,8 @@ src_configure() {
fi
fi
- 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
@@ -75,7 +76,8 @@ run_tests_for_abi() {
src_test() {
# prepare a test compiler
- local clang_version=4.0.0
+ local llvm_version=$(llvm-config --version) || die
+ local clang_version=$(get_version_component_range 1-3 "${llvm_version}")
# copy clang over since resource_dir is located relatively to binary
# therefore, we can put our new libraries in it