Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable CGO in cloudbeat binary #2253

Merged
merged 1 commit into from
Jun 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions 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())

args := devtools.DefaultBuildArgs()
args.CGO = false
return devtools.Build(args)
}

// Clean cleans all generated files and build artifacts.
Expand All @@ -90,7 +93,9 @@ func Clean() error {
// GolangCrossBuild build the Beat binary inside of the golang-builder.
// Do not use directly, use crossBuild instead.
func GolangCrossBuild() error {
return devtools.GolangCrossBuild(devtools.DefaultGolangCrossBuildArgs())
args := devtools.DefaultGolangCrossBuildArgs()
args.CGO = false
return devtools.GolangCrossBuild(args)
}

// BuildGoDaemon builds the go-daemon binary (use crossBuildGoDaemon).
Expand Down Expand Up @@ -234,7 +239,7 @@ func PackageAgent() {
panic(err)
}

if err := os.MkdirAll(dropPath, 0755); err != nil {
if err := os.MkdirAll(dropPath, 0o755); err != nil {
panic(err)
}

Expand Down
Loading