-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[Beats] Build darwin/arm64 and universal binary #29585
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,7 @@ import ( | |
|
||
auditbeat "github.com/elastic/beats/v7/auditbeat/scripts/mage" | ||
devtools "github.com/elastic/beats/v7/dev-tools/mage" | ||
"github.com/elastic/beats/v7/dev-tools/mage/target/build" | ||
|
||
// mage:import | ||
"github.com/elastic/beats/v7/dev-tools/mage/target/common" | ||
|
@@ -74,6 +75,13 @@ func CrossBuildGoDaemon() error { | |
return devtools.CrossBuildGoDaemon() | ||
} | ||
|
||
// AssembleDarwinUniversal merges the darwin/amd64 and darwin/arm64 into a single | ||
// universal binary using `lipo`. It assumes the darwin/amd64 and darwin/arm64 | ||
// were built and only performs the merge. | ||
Comment on lines
+78
to
+80
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Mage dependencies will ensure a function was called, here I need more than just that. I need the build to have been invoked with the right environment variables, it has happened 2 times (once for each architecture). Thus it isn't really a solution here. |
||
func AssembleDarwinUniversal() error { | ||
return build.AssembleDarwinUniversal() | ||
} | ||
|
||
// Package packages the Beat for distribution. | ||
// Use SNAPSHOT=true to build snapshots. | ||
// Use PLATFORMS to control the target platforms. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the plan here? Comment it in once CI is green and merge or do it in another PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ended up testing it on the elastic-agent repo, didn't do what I needed. Besides in order to unblock the release team, better to merge it now and adjust the CI later. But good catch anyway :)