summaryrefslogtreecommitdiff
path: root/lang/llvm
diff options
context:
space:
mode:
authorfcambus <fcambus@pkgsrc.org>2022-06-11 13:44:05 +0000
committerfcambus <fcambus@pkgsrc.org>2022-06-11 13:44:05 +0000
commitc5098094884d45f6538c4c163e5d0b4afe2ab5b3 (patch)
tree16f6351e5fcd99a53261c8375ad5d9a930a75b5b /lang/llvm
parent7c112b0ae6926b264b47e2ac18f7bdcc55850781 (diff)
downloadpkgsrc-c5098094884d45f6538c4c163e5d0b4afe2ab5b3.tar.gz
llvm: add a z3 option to allow building against the Z3 constraint solver.
When both lang/llvm and lang/clang are built with the z3 option enabled, the Z3 constraint solver is activated for the Clang static analyzer. This option is not enabled by default.
Diffstat (limited to 'lang/llvm')
-rw-r--r--lang/llvm/buildlink3.mk6
-rw-r--r--lang/llvm/options.mk9
2 files changed, 12 insertions, 3 deletions
diff --git a/lang/llvm/buildlink3.mk b/lang/llvm/buildlink3.mk
index ff7e8284eb1..15dd233736b 100644
--- a/lang/llvm/buildlink3.mk
+++ b/lang/llvm/buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.16 2021/11/23 20:55:44 wiz Exp $
+# $NetBSD: buildlink3.mk,v 1.17 2022/06/11 13:44:05 fcambus Exp $
BUILDLINK_TREE+= llvm
@@ -98,6 +98,10 @@ pkgbase := llvm
.include "../../mk/terminfo.buildlink3.mk"
.endif
+.if ${PKG_BUILD_OPTIONS.llvm:Mz3}
+.include "../../math/z3/buildlink3.mk"
+.endif
+
.include "../../devel/zlib/buildlink3.mk"
.endif # LLVM_BUILDLINK3_MK
diff --git a/lang/llvm/options.mk b/lang/llvm/options.mk
index aad2d8f3fa3..45a4bff3992 100644
--- a/lang/llvm/options.mk
+++ b/lang/llvm/options.mk
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.12 2022/01/07 15:44:32 tnn Exp $
+# $NetBSD: options.mk,v 1.13 2022/06/11 13:44:05 fcambus Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.llvm
@@ -8,7 +8,7 @@ LLVM_TARGETS= AArch64 AMDGPU ARM AVR BPF Hexagon Lanai Mips MSP430 NVPTX PowerPC
PLIST_VARS+= ${tgt}
PKG_SUPPORTED_OPTIONS+= llvm-target-${tgt:tl}
.endfor
-PKG_SUPPORTED_OPTIONS+= terminfo
+PKG_SUPPORTED_OPTIONS+= terminfo z3
# Terminfo is used for colour output, only enable it by default if terminfo
# is builtin to avoid unnecessary dependencies which could cause bootstrap
@@ -55,4 +55,9 @@ LLVM_TARGETS_TO_BUILD+= ${tgt}
CMAKE_ARGS+= -DLLVM_ENABLE_TERMINFO=OFF
.endif
+.if !empty(PKG_OPTIONS:Mz3)
+.include "../../math/z3/buildlink3.mk"
+CMAKE_ARGS+= -DLLVM_ENABLE_Z3_SOLVER=ON
+.endif
+
CMAKE_ARGS+= -DLLVM_TARGETS_TO_BUILD="${LLVM_TARGETS_TO_BUILD:ts;}"