Skip to content

Commit

Permalink
instead of introducing server-fips target, use ENABLE_FIPS=1
Browse files Browse the repository at this point in the history
  • Loading branch information
tiancaiamao committed Nov 10, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 108a724 commit 3b124df
Showing 2 changed files with 7 additions and 9 deletions.
8 changes: 0 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -163,14 +163,6 @@ else
CGO_ENABLED=1 $(GOBUILD) $(RACE_FLAG) -ldflags '$(LDFLAGS) $(CHECK_FLAG)' -o '$(TARGET)' ./cmd/tidb-server
endif

server_fips:
ifeq ($(TARGET), "")
GOEXPERIMENT=boringcrypto CGO_ENABLED=1 $(GOBUILD) -tags boringcrypto $(RACE_FLAG) -ldflags '$(LDFLAGS) $(CHECK_FLAG)' -o bin/tidb-server ./cmd/tidb-server
else
GOEXPERIMENT=boringcrypto CGO_ENABLED=1 $(GOBUILD) -tags boringcrypto $(RACE_FLAG) -ldflags '$(LDFLAGS) $(CHECK_FLAG)' -o '$(TARGET)' ./cmd/tidb-server
endif


server_debug:
ifeq ($(TARGET), "")
CGO_ENABLED=1 $(GOBUILD) -gcflags="all=-N -l" $(RACE_FLAG) -ldflags '$(LDFLAGS) $(CHECK_FLAG)' -o bin/tidb-server-debug ./cmd/tidb-server
8 changes: 7 additions & 1 deletion Makefile.common
Original file line number Diff line number Diff line change
@@ -27,7 +27,13 @@ path_to_add := $(addsuffix /bin,$(subst :,/bin:,$(GOPATH))):$(PWD)/tools/bin
export PATH := $(path_to_add):$(PATH)

GO := GO111MODULE=on go
GOBUILD := $(GO) build $(BUILD_FLAG) -tags codes
BUILD_FLAG := -tags codes
GOEXPERIMENT=
ifeq ("${ENABLE_FIPS}", "1")
BUILD_FLAG = -tags codes,boringcrypto
GOEXPERIMENT = GOEXPERIMENT=boringcrypto
endif
GOBUILD := $(GOEXPERIMENT) $(GO) build $(BUILD_FLAG)
GOBUILDCOVERAGE := GOPATH=$(GOPATH) cd tidb-server; $(GO) test -coverpkg="../..." -c .
GOTEST := $(GO) test -p $(P)
OVERALLS := GO111MODULE=on overalls

0 comments on commit 3b124df

Please sign in to comment.