Skip to content

Commit

Permalink
fix disable optimizations and inlining for debug (#438) (#454)
Browse files Browse the repository at this point in the history
(cherry picked from commit 7186cf5)

Co-authored-by: Anderson Queiroz <anderson.queiroz@elastic.co>
  • Loading branch information
mergify[bot] and AndersonQ authored May 25, 2022
1 parent 7727fc3 commit e38418e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dev-tools/mage/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func DefaultBuildArgs() BuildArgs {

if DevBuild {
// Disable optimizations (-N) and inlining (-l) for debugging.
args.ExtraFlags = append(args.ExtraFlags, `-gcflags`, `"all=-N -l"`)
args.ExtraFlags = append(args.ExtraFlags, `-gcflags=all=-N -l`)
} else {
// Strip all debug symbols from binary (does not affect Go stack traces).
args.LDFlags = append(args.LDFlags, "-s")
Expand Down

0 comments on commit e38418e

Please sign in to comment.