Skip to content

Commit

Permalink
Changed default db back to cgo
Browse files Browse the repository at this point in the history
moloch-- committed Dec 22, 2021
1 parent 815bf3c commit 46d32e6
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@

GO ?= go
ENV =
TAGS = -tags osusergo,netgo,gosqlite
TAGS = -tags osusergo,netgo,cgosqlite

#
# Version Information
@@ -39,6 +39,16 @@ STATIC_TARGET := linux
UNAME_S := $(shell uname -s)
UNAME_P := $(shell uname -p)

# If the target is Windows from Linux/Darwin, check for mingw
CROSS_COMPILERS = x86_64-w64-mingw32-gcc x86_64-w64-mingw32-g++
ifneq (,$(findstring cgosqlite,$(TAGS)))
ifeq ($(MAKECMDGOALS), windows)
K := $(foreach exec,$(CROSS_COMPILERS),\
$(if $(shell which $(exec)),some string,$(error "Missing cross-compiler $(exec) in PATH")))
ENV += CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++
endif
endif

# Programs required for generating protobuf/grpc files
PB_COMPILERS = protoc protoc-gen-go protoc-gen-go-grpc
ifeq ($(MAKECMDGOALS), pb)
2 changes: 1 addition & 1 deletion server/db/sql_cgo.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build csqlite
//go:build cgosqlite

package db

0 comments on commit 46d32e6

Please sign in to comment.