pkgsrc-Changes archive

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

CVS commit: pkgsrc/lang/clang



Module Name:    pkgsrc
Committed By:   fcambus
Date:           Sat Jun 11 13:45:44 UTC 2022

Modified Files:
        pkgsrc/lang/clang: Makefile.common

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 pkgsrc/lang/clang/Makefile.common

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/lang/clang/Makefile.common
diff -u pkgsrc/lang/clang/Makefile.common:1.48 pkgsrc/lang/clang/Makefile.common:1.49
--- pkgsrc/lang/clang/Makefile.common:1.48      Thu May  5 08:24:41 2022
+++ pkgsrc/lang/clang/Makefile.common   Sat Jun 11 13:45:44 2022
@@ -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.notdylib=     yes
 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+=               -DLLVM_INCLUDE_TESTS=OFF
 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 @@ post-extract:
 .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