Skip to content

Commit

Permalink
plugin: fix plugin build and load with go 1.13 (#13455) (#13527)
Browse files Browse the repository at this point in the history
  • Loading branch information
lysu authored and sre-bot committed Nov 27, 2019
1 parent a8420b1 commit 92f4274
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)))
export PATH := $(path_to_add):$(PATH)

GO := GO111MODULE=on go
GOBUILD := CGO_ENABLED=1 $(GO) build $(BUILD_FLAG) -trimpath
GOBUILD := CGO_ENABLED=1 $(GO) build $(BUILD_FLAG)
GOTEST := CGO_ENABLED=1 $(GO) test -p 3
OVERALLS := CGO_ENABLED=1 overalls
GOVERALLS := goveralls
Expand Down
2 changes: 0 additions & 2 deletions cmd/pluginpkg/pluginpkg.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,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.Stderr = os.Stderr
Expand Down

0 comments on commit 92f4274

Please sign in to comment.