Skip to content

Commit

Permalink
plugin: fix plugin build and load with go 1.13 (pingcap#13455)
Browse files Browse the repository at this point in the history
  • Loading branch information
lysu authored and XiaTianliang committed Dec 21, 2019
1 parent 213ae12 commit 6057e79
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions cmd/pluginpkg/pluginpkg.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6057e79

Please sign in to comment.