-
Notifications
You must be signed in to change notification settings - Fork 8
build arm64 binaries for macOS #32
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
Conversation
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.
to support apple M1 devices we need arm builds of admin-helper
this is not 100% true, current amd64 admin-helper runs fine on M1 macOS. It's cleaner to have a native build though.
update rmp spec to also install the macOS arm binary
can you fix the 'rmp' typo?
crc-admin-helper.spec.in
Outdated
@@ -75,6 +76,9 @@ go test ./... | |||
#gopkgfiles | |||
|
|||
%changelog | |||
* Tue May 31 2022 Anjan Nath <[email protected]> | |||
- install macOS arm64 builds |
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.
This can be added below the * Tue May 17 2022 Christophe Fergeau <[email protected]> - 0.0.11-1
line
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.
made the change, is it because of the version change? as that version would also contain this change?
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.
The 0.11-1 line was added in preparation for the next admin-helper release, there was no such build yet. So the changes we want to list for the next build can go under that line.
@@ -37,14 +37,17 @@ golangci-lint: | |||
$(BUILD_DIR)/macos-amd64/$(BINARY_NAME): | |||
CGO_ENABLED=0 GOARCH=amd64 GOOS=darwin go build -ldflags="$(LDFLAGS)" -o $(BUILD_DIR)/macos-amd64/$(BINARY_NAME) $(GO_BUILDFLAGS) ./cmd/admin-helper/ | |||
|
|||
$(BUILD_DIR)/macos-arm64/$(BINARY_NAME)-arm64: | |||
CGO_ENABLED=0 GOARCH=arm64 GOOS=darwin go build -ldflags="$(LDFLAGS)" -o $(BUILD_DIR)/macos-amd64/$(BINARY_NAME)-arm64 $(GO_BUILDFLAGS) ./cmd/admin-helper/ |
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 wonder if we should suffix all binaries with -${arch}
even the amd64 ones, or just this arm64
binary. Worth trying this way, as hopefully this means less changes all the place.
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.
yeah, same thought i had, didn't want to change things in a lot of places.
although the amd64 build supports running in apple M1 devices having native arm builds of admin-helper is cleaner and should be a bit faster
@@ -78,6 +79,9 @@ go test ./... | |||
* Tue May 17 2022 Christophe Fergeau <[email protected]> - 0.0.11-1 | |||
- Update to admin-helper 0.0.11 | |||
|
|||
* Tue May 31 2022 Anjan Nath <[email protected]> | |||
- install macOS arm64 builds | |||
|
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.
This should look like this
* Tue May 31 2022 Anjan Nath <[email protected]> - 0.0.11-1
- Update to admin-helper 0.0.11
- Install macOS arm64 builds
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.
updated
No description provided.