Skip to content

Commit

Permalink
use build args
Browse files Browse the repository at this point in the history
  • Loading branch information
orouz committed May 29, 2024
1 parent 4b722a5 commit 14e58aa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,10 @@ func Check() error {
// Build builds the Beat binary.
func Build() error {
mg.Deps(BuildOpaBundle)
return devtools.Build(devtools.DefaultBuildArgs())
buildArgs := devtools.DefaultBuildArgs()
buildArgs.LDFlags = append(buildArgs.LDFlags, "-w") // Disable DWARF generation to reduce binary size
buildArgs.CGO = false
return devtools.Build(buildArgs)
}

// Clean cleans all generated files and build artifacts.
Expand Down

0 comments on commit 14e58aa

Please sign in to comment.