-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
supporting crossbuild all components #3515
Conversation
3f6e709
to
9428122
Compare
Makefile
Outdated
# | ||
# | ||
# Example: | ||
# make crossbuild | ||
# make crossbuild HELP=y | ||
# make crossbuild WHAT=edgecore | ||
# make crossbuild WHAT=edgecore GOARM=GOARM7 | ||
# make crossbuild WHAT=edgecore ARM=GOARM7 |
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.
GOARM
is a golang env value, so use ARM here to avoid conflicting with golang. Besides, if I set GOARM=GOARM8
, will exit with err like: Invalid GOARM value. Must be 5, 6, or 7.
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.
But why it works before? Let me have a try.
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.
If I set GOARM=GOARM8
, will exit with err Invalid GOARM value. Must be 5, 6, or 7.
, before for armv8, just haven't set the GOARM value, default is armv8
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.
agree, but the code should not crush if we pass the value. I create a simple quick fix for this, pls let me know whether that make sense to you: #3522
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.
And how about define the variable as "ARM_VERSION" instead of "ARM"? so it is more descriptive.
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.
With your pr, I think we can still use GOARM
:) PTAL @chendave
9428122
to
989fecd
Compare
make crossbuild WHAT=edgecore error
|
hack/lib/golang.sh
Outdated
KUBEEDGE_ALL_CROSS_BINARIES=( | ||
edgecore | ||
) | ||
|
||
kubeedge::golang::is_cross_build_binary() { | ||
local key=$1 | ||
for bin in "${KUBEEDGE_ALL_CROSS_BINARIES[@]}" ; do |
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.
here also use this deleted KUBEEDGE_ALL_CROSS_BINARIES variable, also need fix
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 fix make crossbuild WHAT=edgecore
error.
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.
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.
LGTM test OK
989fecd
to
3834734
Compare
@@ -155,18 +155,18 @@ define CROSSBUILD_HELP_INFO | |||
# cross build components. | |||
# | |||
# Args: | |||
# WHAT: Component names to be lint check. support: $(CROSSBUILD_COMPONENTS) | |||
# WHAT: Component names to be lint check. support: $(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.
Use $(BINARIES) here, CROSSBUILD_COMPONENTS seems can be removed? Line 150
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. Have removed :)
3834734
to
8e0f48b
Compare
Makefile
Outdated
# GOARM: go arm value, now support:$(GOARM_VALUES) | ||
# If not specified ,default use GOARM=GOARM8 | ||
# GOARM: arm version for go crossbuild, now support:$(GOARM_VALUES) | ||
# If not specified, default use ARM=GOARM8 |
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.
Hmm... GOARM is the original args, but you have updated this to "ARM", so it would be something like,
ARM: arm version....
But I still think using ARM
here is a little misleading.
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.
Yes, I also think ARM
maybe misleading.. ;-)
8e0f48b
to
05da6bc
Compare
Signed-off-by: fisherxu <xufei40@huawei.com>
05da6bc
to
59b2aa9
Compare
@gy95: adding LGTM is restricted to approvers and reviewers in OWNERS files. In response to this: Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/lgtm thanks! |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: chendave, gy95 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 |
Signed-off-by: fisherxu xufei40@huawei.com
What type of PR is this?
What this PR does / why we need it:
Supporting crossbuild all components, now we can crossbuild all components as below:
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
cc @chendave @zhu733756 @gy95
Does this PR introduce a user-facing change?: