mirror of
https://github.com/caddyserver/xcaddy.git
synced 2024-11-05 17:00:14 +00:00
bug: fix regression preventing -trimpath
and trim of debug symbols (#182)
* bug: fix regression preventing `-trimpath` and trim of debug symbols * Update builder.go Co-authored-by: Matt Holt <mholt@users.noreply.github.com> --------- Co-authored-by: Matt Holt <mholt@users.noreply.github.com>
This commit is contained in:
parent
f99151eee9
commit
85e12f87b2
2 changed files with 2 additions and 1 deletions
|
@ -131,6 +131,7 @@ func (b Builder) Build(ctx context.Context, outputFile string) error {
|
|||
cmd.Args = append(cmd.Args,
|
||||
"-ldflags", "-w -s", // trim debug symbols
|
||||
"-trimpath",
|
||||
"-tags", "nobadger",
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -127,7 +127,7 @@ func (b Builder) newEnvironment(ctx context.Context) (*environment, error) {
|
|||
tempFolder: tempFolder,
|
||||
timeoutGoGet: b.TimeoutGet,
|
||||
skipCleanup: b.SkipCleanup,
|
||||
buildFlags: strings.TrimSpace("-tags nobadger " + b.BuildFlags),
|
||||
buildFlags: b.BuildFlags,
|
||||
modFlags: b.ModFlags,
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue