diff --git a/Makefile b/Makefile index 1d5d1df19e74a..a67a1f9fe72df 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ 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 -trimpath +GOBUILD := $(GO) build $(BUILD_FLAG) -tags codes GOBUILDCOVERAGE := GOPATH=$(GOPATH) cd tidb-server; $(GO) test -coverpkg="../..." -c . GOTEST := $(GO) test -p 8 OVERALLS := GO111MODULE=on overalls diff --git a/cmd/pluginpkg/pluginpkg.go b/cmd/pluginpkg/pluginpkg.go index 905c24d5d42cb..07566243b329b 100644 --- a/cmd/pluginpkg/pluginpkg.go +++ b/cmd/pluginpkg/pluginpkg.go @@ -155,10 +155,8 @@ func main() { } outputFile := filepath.Join(outDir, pluginName+"-"+version+".so") - pluginPath := `-pluginpath=` + pluginName + "-" + version ctx := context.Background() buildCmd := exec.CommandContext(ctx, "go", "build", - "-ldflags", pluginPath, "-buildmode=plugin", "-o", outputFile, pkgDir) buildCmd.Dir = pkgDir