Skip to content

Commit

Permalink
build: enable cgo
Browse files Browse the repository at this point in the history
cgo allows the use of C libraries in GoLang. Some packages like sqlite3
depend on this feature.

We could allow this, barring any security issues (e.g., we can't confirm
the hash of a C library before linking it).

Signed-off-by: Jagannathan Raman <jag.raman@oracle.com>
jraman567 authored and setrofim committed Nov 7, 2024
1 parent 2ffb051 commit 7b4323c
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mk/cmd.mk
Original file line number Diff line number Diff line change
@@ -36,7 +36,7 @@ _check_scheme_loader:
fi

$(CMD): $(SRCS) $(CMD_DEPS) _check_scheme_loader _check_version
go build -o $(CMD) -ldflags \
CGO_ENABLED=1 go build -o $(CMD) -ldflags \
"-X 'github.com/veraison/services/config.Version=$(VERSION_FROM_GIT)' \
-X 'github.com/veraison/services/config.SchemeLoader=$(SCHEME_LOADER)'"

2 changes: 1 addition & 1 deletion mk/plugin.mk
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ else
DFLAGS :=
endif

$(PLUGIN): $(SRCS) ; go build $(DFLAGS) -o $(PLUGIN)
$(PLUGIN): $(SRCS) ; CGO_ENABLED=1 go build $(DFLAGS) -o $(PLUGIN)

.PHONY: all
all: all-hook-pre realall

0 comments on commit 7b4323c

Please sign in to comment.