mirror of
https://github.com/caddyserver/xcaddy.git
synced 2025-03-23 21:54:53 +01: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,
|
cmd.Args = append(cmd.Args,
|
||||||
"-ldflags", "-w -s", // trim debug symbols
|
"-ldflags", "-w -s", // trim debug symbols
|
||||||
"-trimpath",
|
"-trimpath",
|
||||||
|
"-tags", "nobadger",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -127,7 +127,7 @@ func (b Builder) newEnvironment(ctx context.Context) (*environment, error) {
|
||||||
tempFolder: tempFolder,
|
tempFolder: tempFolder,
|
||||||
timeoutGoGet: b.TimeoutGet,
|
timeoutGoGet: b.TimeoutGet,
|
||||||
skipCleanup: b.SkipCleanup,
|
skipCleanup: b.SkipCleanup,
|
||||||
buildFlags: strings.TrimSpace("-tags nobadger " + b.BuildFlags),
|
buildFlags: b.BuildFlags,
|
||||||
modFlags: b.ModFlags,
|
modFlags: b.ModFlags,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue