@@ -15,18 +15,22 @@ include mk/gmsl
15
15
# (including cscli) so it is not recommended for production use.
16
16
BUILD_RE2_WASM ?= 0
17
17
18
- GO_TAGS :=
18
+ # expr_debug tag is required to enable the debug mode in expr
19
+ GO_TAGS := netgo,osusergo,expr_debug
19
20
20
21
# By default, build with CGO and sqlite3.
21
22
BUILD_SQLITE ?= mattn
22
23
SQLITE_MSG = Using mattn/go-sqlite3
23
24
24
25
# Optionally, use a pure Go implementation of sqlite.
25
26
ifeq ($(BUILD_SQLITE ) ,modernc)
27
+ SQLITE_MSG = Using modernc/sqlite
26
28
GO_TAGS := $(GO_TAGS ) ,sqlite_modernc
29
+ else
30
+ ifeq ($(BUILD_SQLITE ) ,mattn)
27
31
SQLITE_MSG = Using modernc/sqlite
32
+ GO_TAGS := $(GO_TAGS ) ,sqlite_omit_load_extension
28
33
else
29
- ifneq ($(BUILD_SQLITE ) ,mattn)
30
34
$(error BUILD_SQLITE must be 'mattn' or 'modernc')
31
35
endif
32
36
endif
@@ -93,9 +97,6 @@ ifneq (,$(DOCKER_BUILD))
93
97
LD_OPTS_VARS += -X 'github.com/crowdsecurity/go-cs-lib/version.System=docker'
94
98
endif
95
99
96
- # expr_debug tag is required to enable the debug mode in expr
97
- GO_TAGS := $(GO_TAGS ) ,netgo,osusergo,sqlite_omit_load_extension,expr_debug
98
-
99
100
# Allow building on ubuntu 24.10, see https://github.com/golang/go/issues/70023
100
101
export CGO_LDFLAGS_ALLOW =-Wl,--(push|pop)-state.*
101
102
0 commit comments