SLOT="5"
KEYWORDS=""
IUSE="debug default-compiler-rt default-libcxx +doc multitarget
- +static-analyzer test xml elibc_musl kernel_FreeBSD ${ALL_LLVM_TARGETS[*]}"
+ +static-analyzer test xml z3 elibc_musl kernel_FreeBSD
+ ${ALL_LLVM_TARGETS[*]}"
RDEPEND="
~sys-devel/llvm-${PV}:${SLOT}=[debug=,${LLVM_TARGET_USEDEPS// /,},${MULTILIB_USEDEP}]
- static-analyzer? ( dev-lang/perl:* )
+ static-analyzer? (
+ dev-lang/perl:*
+ z3? ( sci-mathematics/z3:0= )
+ )
xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] )
${PYTHON_DEPS}"
# configparser-3.2 breaks the build (3.3 or none at all are fine)
-DCLANG_ENABLE_ARCMT=$(usex static-analyzer)
-DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer)
+ # z3 is not multilib-friendly
+ -DCLANG_ANALYZER_BUILD_Z3=$(multilib_native_usex z3)
+ -DZ3_INCLUDE_DIR="${EPREFIX}/usr/include/z3"
)
use test && mycmakeargs+=(
-DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
<flag name="default-libcxx">Use libc++ instead of libstdc++ as the default stdlib for clang</flag>
<flag name="multitarget">Build all host targets (default: host only)</flag>
<flag name="static-analyzer">Install the Clang static analyzer</flag>
+ <flag name="z3">Enable the static analyzer constraint manager backend using <pkg>sci-mathematics/z3</pkg></flag>
</use>
</pkgmetadata>