commit:     e0c37990b91903cbccdd3a1eeba265c910c99cc4
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Jul 22 10:21:07 2019 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Jul 22 10:42:14 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e0c37990

sys-devel/llvm: 9.0.0+ introduce Z3 support (moved from clang)

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 sys-devel/llvm/llvm-10.0.0.9999.ebuild | 6 ++++--
 sys-devel/llvm/llvm-9.0.0.9999.ebuild  | 6 ++++--
 sys-devel/llvm/metadata.xml            | 1 +
 3 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/sys-devel/llvm/llvm-10.0.0.9999.ebuild 
b/sys-devel/llvm/llvm-10.0.0.9999.ebuild
index 04608a4f141..8f93e039da4 100644
--- a/sys-devel/llvm/llvm-10.0.0.9999.ebuild
+++ b/sys-devel/llvm/llvm-10.0.0.9999.ebuild
@@ -37,7 +37,7 @@ LICENSE="UoI-NCSA rc BSD public-domain
        llvm_targets_ARM? ( LLVM-Grant )"
 SLOT="$(ver_cut 1)"
 KEYWORDS=""
-IUSE="debug doc exegesis gold libedit +libffi ncurses test xar xml
+IUSE="debug doc exegesis gold libedit +libffi ncurses test xar xml z3
        kernel_Darwin ${ALL_LLVM_TARGETS[*]}"
 RESTRICT="!test? ( test )"
 
@@ -54,7 +54,8 @@ RDEPEND="
        libffi? ( >=virtual/libffi-3.0.13-r1:0=[${MULTILIB_USEDEP}] )
        ncurses? ( >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}] )
        xar? ( app-arch/xar )
-       xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] )"
+       xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] )
+       z3? ( >=sci-mathematics/z3-4.7.1:0=[${MULTILIB_USEDEP}] )"
 # configparser-3.2 breaks the build (3.3 or none at all are fine)
 DEPEND="${RDEPEND}
        dev-lang/perl
@@ -146,6 +147,7 @@ multilib_src_configure() {
                -DLLVM_ENABLE_LIBPFM=$(usex exegesis)
                -DLLVM_ENABLE_EH=ON
                -DLLVM_ENABLE_RTTI=ON
+               -DLLVM_ENABLE_Z3_SOLVER=$(usex z3)
 
                -DWITH_POLLY=OFF # TODO
 

diff --git a/sys-devel/llvm/llvm-9.0.0.9999.ebuild 
b/sys-devel/llvm/llvm-9.0.0.9999.ebuild
index ecf98d65555..dbdf1284b2a 100644
--- a/sys-devel/llvm/llvm-9.0.0.9999.ebuild
+++ b/sys-devel/llvm/llvm-9.0.0.9999.ebuild
@@ -35,7 +35,7 @@ LICENSE="UoI-NCSA rc BSD public-domain
        llvm_targets_ARM? ( LLVM-Grant )"
 SLOT="$(ver_cut 1)"
 KEYWORDS=""
-IUSE="debug doc exegesis gold libedit +libffi ncurses test xar xml
+IUSE="debug doc exegesis gold libedit +libffi ncurses test xar xml z3
        kernel_Darwin ${ALL_LLVM_TARGETS[*]}"
 RESTRICT="!test? ( test )"
 
@@ -52,7 +52,8 @@ RDEPEND="
        libffi? ( >=virtual/libffi-3.0.13-r1:0=[${MULTILIB_USEDEP}] )
        ncurses? ( >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}] )
        xar? ( app-arch/xar )
-       xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] )"
+       xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] )
+       z3? ( >=sci-mathematics/z3-4.7.1:0=[${MULTILIB_USEDEP}] )"
 # configparser-3.2 breaks the build (3.3 or none at all are fine)
 DEPEND="${RDEPEND}
        dev-lang/perl
@@ -141,6 +142,7 @@ multilib_src_configure() {
                -DLLVM_ENABLE_LIBPFM=$(usex exegesis)
                -DLLVM_ENABLE_EH=ON
                -DLLVM_ENABLE_RTTI=ON
+               -DLLVM_ENABLE_Z3_SOLVER=$(usex z3)
 
                -DWITH_POLLY=OFF # TODO
 

diff --git a/sys-devel/llvm/metadata.xml b/sys-devel/llvm/metadata.xml
index d0737020549..1f534c1999e 100644
--- a/sys-devel/llvm/metadata.xml
+++ b/sys-devel/llvm/metadata.xml
@@ -17,5 +17,6 @@
                <flag name="ncurses">Support querying terminal properties using 
ncurses' terminfo</flag>
                <flag name="xar">Support dumping LLVM bitcode sections in 
Mach-O files
                        (uses <pkg>app-arch/xar</pkg>)</flag>
+               <flag name="z3">Enable support for 
<pkg>sci-mathematics/z3</pkg> constraint solver</flag>
        </use>
 </pkgmetadata>

Reply via email to