-
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
Add make targets for darwin/arm64 binaries #10202
Add make targets for darwin/arm64 binaries #10202
Conversation
Makefile
Outdated
@@ -219,7 +228,8 @@ endif | |||
.PHONY: e2e-linux-amd64 e2e-linux-arm64 e2e-darwin-amd64 e2e-windows-amd64.exe | |||
e2e-linux-amd64: out/e2e-linux-amd64 ## Execute end-to-end testing for Linux 64bit | |||
e2e-linux-arm64: out/e2e-linux-arm64 ## Execute end-to-end testing for Linux ARM 64bit | |||
e2e-darwin-amd64: out/e2e-darwin-amd64 ## Execute end-to-end testing for Darwin 64bit | |||
e2e-darwin-amd64: out/e2e-darwin-amd64 ## Execute end-to-end testing for Darwin x86 64bit |
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.
lets fix the comment for all e2e, I think the right comment should be
"build end2end binary for ..." (it doesnt execute the test)
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.
done
Makefile
Outdated
minikube-windows-amd64.exe: out/minikube-windows-amd64.exe ## Build Minikube for Windows 64bit | ||
|
||
out/minikube-darwin: out/minikube-darwin-amd64 out/minikube-darwin-arm64 | ||
lipo -create $^ -output $@ |
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 this lipo for ?
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.
it's a standard darwin to work with executables.
https://ss64.com/osx/lipo.html
Here it's used to repack binaries for amd64 and arm64 into single executable file
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.
does this affect the binary size ? and would it not work without it ?
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.
It's a pun on "fat binaries", like https://en.wikipedia.org/wiki/Liposuction
(they later got renamed to "universal binaries", making it incomprehensible)
There is actually a similar project for Linux: https://icculus.org/fatelf/
But it never caught on, I guess not the same amount of closed binaries ?
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.e. it makes the "files to download" list shorter, but the binaries bigger (twice)
if we did that for all of kubernetes (all arch), it would be 5x the current size
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.
got it. removed
Makefile
Outdated
minikube-windows-amd64.exe: out/minikube-windows-amd64.exe ## Build Minikube for Windows 64bit | ||
|
||
out/minikube-darwin: out/minikube-darwin-amd64 out/minikube-darwin-arm64 | ||
lipo -create $^ -output $@ |
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.
It's a pun on "fat binaries", like https://en.wikipedia.org/wiki/Liposuction
(they later got renamed to "universal binaries", making it incomprehensible)
There is actually a similar project for Linux: https://icculus.org/fatelf/
But it never caught on, I guess not the same amount of closed binaries ?
@ilya-zuyev :
Note: it has not been released yet, see https://golang.org/doc/devel/release.html See also https://github.com/kubernetes/kubernetes/blob/master/build/build-image/cross/VERSION |
Makefile
Outdated
@@ -378,7 +388,7 @@ darwin: minikube-darwin-amd64 ## Build minikube for Darwin 64bit | |||
linux: minikube-linux-amd64 ## Build minikube for Linux 64bit | |||
|
|||
.PHONY: e2e-cross | |||
e2e-cross: e2e-linux-amd64 e2e-linux-arm64 e2e-darwin-amd64 e2e-windows-amd64.exe ## End-to-end cross test | |||
e2e-cross: e2e-linux-amd64 e2e-linux-arm64 e2e-darwin-amd64 e2e-darwin-arm64 e2e-windows-amd64.exe ## End-to-end cross test |
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 fails to build, so please revert this 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.
oops, was testing on go1.16 beta. removed. thanks!
/ok-to-test |
@@ -43,9 +43,10 @@ echo "Verifying ISO exists ..." | |||
make verify-iso | |||
|
|||
# Build and upload | |||
env BUILD_IN_DOCKER=y \ | |||
env BUILD_IN_DOCKER=y BUILD_IMAGE=golang:1.16beta1-buster \ |
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.
since we change in Makefile no need to change both places. so later we can revert only on file
…m64_binary' into ilyaz/add_darwin_arm64_binary
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: afbjorklund, ilya-zuyev, medyagh The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This PR adds Makefile targets to build
minikube-darwin-arm64
ande2e-darwin-arm64
binariesAlso this PR adds a rule for "fat" darwin binary
minikube-darwin
containing both x86 and arm64 sections