Skip to content

Commit 35fa449

Browse files
authored
fix: Make static linking conditional only for Linux (#1310)
This applies the new static linking feature only for Linux platforms
1 parent 4e90152 commit 35fa449

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

serve/package.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ func (s *PluginServe) build(pluginDirectory, goos, goarch, distPath, pluginVersi
110110
return nil, err
111111
}
112112
ldFlags := fmt.Sprintf("-s -w -X %s/plugin.Version=%s", importPath, pluginVersion)
113-
if s.plugin.IsStaticLinkingEnabled() {
113+
if s.plugin.IsStaticLinkingEnabled() && strings.EqualFold(goos, plugin.GoOSLinux) {
114114
ldFlags += " -linkmode external -extldflags=-static"
115115
}
116116
args := []string{"build", "-o", pluginPath}

0 commit comments

Comments
 (0)