Skip to content

Commit 1805910

Browse files
committed
fix GO_TAGS
1 parent 0487e61 commit 1805910

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Makefile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,22 @@ include mk/gmsl
1515
# (including cscli) so it is not recommended for production use.
1616
BUILD_RE2_WASM ?= 0
1717

18-
GO_TAGS :=
18+
#expr_debug tag is required to enable the debug mode in expr
19+
GO_TAGS := netgo,osusergo,expr_debug
1920

2021
# By default, build with CGO and sqlite3.
2122
BUILD_SQLITE ?= mattn
2223
SQLITE_MSG = Using mattn/go-sqlite3
2324

2425
# Optionally, use a pure Go implementation of sqlite.
2526
ifeq ($(BUILD_SQLITE),modernc)
27+
SQLITE_MSG = Using modernc/sqlite
2628
GO_TAGS := $(GO_TAGS),sqlite_modernc
29+
else
30+
ifeq ($(BUILD_SQLITE),mattn)
2731
SQLITE_MSG = Using modernc/sqlite
32+
GO_TAGS := $(GO_TAGS),sqlite_omit_load_extension
2833
else
29-
ifneq ($(BUILD_SQLITE),mattn)
3034
$(error BUILD_SQLITE must be 'mattn' or 'modernc')
3135
endif
3236
endif
@@ -93,9 +97,6 @@ ifneq (,$(DOCKER_BUILD))
9397
LD_OPTS_VARS += -X 'github.com/crowdsecurity/go-cs-lib/version.System=docker'
9498
endif
9599

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-
99100
# Allow building on ubuntu 24.10, see https://github.com/golang/go/issues/70023
100101
export CGO_LDFLAGS_ALLOW=-Wl,--(push|pop)-state.*
101102

0 commit comments

Comments
 (0)