pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/llvm llvm: add a z3 option to allow building agai...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/c8d8eeac2636
branches:  trunk
changeset: 380650:c8d8eeac2636
user:      fcambus <fcambus%pkgsrc.org@localhost>
date:      Sat Jun 11 13:44:05 2022 +0000

description:
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:

 lang/llvm/buildlink3.mk |  6 +++++-
 lang/llvm/options.mk    |  9 +++++++--
 2 files changed, 12 insertions(+), 3 deletions(-)

diffs (48 lines):

diff -r bd8a0e824a85 -r c8d8eeac2636 lang/llvm/buildlink3.mk
--- a/lang/llvm/buildlink3.mk   Sat Jun 11 13:33:38 2022 +0000
+++ b/lang/llvm/buildlink3.mk   Sat Jun 11 13:44:05 2022 +0000
@@ -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 @@
 .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 -r bd8a0e824a85 -r c8d8eeac2636 lang/llvm/options.mk
--- a/lang/llvm/options.mk      Sat Jun 11 13:33:38 2022 +0000
+++ b/lang/llvm/options.mk      Sat Jun 11 13:44:05 2022 +0000
@@ -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 @@
 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 @@
 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;}"



Home | Main Index | Thread Index | Old Index