pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/lang/clang clang: add a z3 option to allow building ag...
details: https://anonhg.NetBSD.org/pkgsrc/rev/9e03c1d6becd
branches: trunk
changeset: 380651:9e03c1d6becd
user: fcambus <fcambus%pkgsrc.org@localhost>
date: Sat Jun 11 13:45:44 2022 +0000
description:
clang: 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/clang/Makefile.common | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diffs (40 lines):
diff -r c8d8eeac2636 -r 9e03c1d6becd lang/clang/Makefile.common
--- a/lang/clang/Makefile.common Sat Jun 11 13:44:05 2022 +0000
+++ b/lang/clang/Makefile.common Sat Jun 11 13:45:44 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.48 2022/05/05 08:24:41 nia Exp $
+# $NetBSD: Makefile.common,v 1.49 2022/06/11 13:45:44 fcambus Exp $
# used by lang/clang/Makefile
# used by lang/clang-tools-extra/Makefile
@@ -145,7 +145,7 @@
PLIST_SUBST+= SOEXT=${SOEXT}
PKG_OPTIONS_VAR= PKG_OPTIONS.clang
-PKG_SUPPORTED_OPTIONS= tests
+PKG_SUPPORTED_OPTIONS= tests z3
.include "../../mk/bsd.options.mk"
@@ -160,6 +160,16 @@
CMAKE_ARGS+= -DCLANG_INCLUDE_TESTS=OFF
.endif
+.include "../../lang/llvm/buildlink3.mk"
+
+.if !empty(PKG_OPTIONS:Mz3)
+.if empty(PKG_BUILD_OPTIONS.llvm:Mz3)
+PKG_FAIL_REASON+= "z3 PKG_OPTION must be enabled in lang/llvm"
+.endif
+.include "../../math/z3/buildlink3.mk"
+CMAKE_ARGS+= -DLLVM_ENABLE_Z3_SOLVER=ON
+.endif
+
post-extract:
${MKDIR} ${WRKDIR}/build
@@ -168,4 +178,3 @@
.include "../../lang/python/application.mk"
.include "../../lang/python/tool.mk"
DEPENDS+= llvm-${PKGVERSION_NOREV}{,nb*}:../../lang/llvm
-.include "../../lang/llvm/buildlink3.mk"
Home |
Main Index |
Thread Index |
Old Index