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

Add support for Linux ARM64 #3853

Merged
merged 10 commits into from
Aug 23, 2022
Merged

Add support for Linux ARM64 #3853

merged 10 commits into from
Aug 23, 2022

Conversation

dlon
Copy link
Member

@dlon dlon commented Aug 22, 2022

This makes it possible to build the app for Linux ARM. It can be done either via cross-compilation or by building it on an ARM host (with the caveat that grpc-tools will refuse to generate code for the management interface .proto (#2500) in the latter case).


This change is Reviewable

@dlon dlon requested a review from pinkisemils August 22, 2022 13:44
Copy link
Collaborator

@pinkisemils pinkisemils left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 1 files at r1, 1 of 1 files at r2, 1 of 1 files at r3, 1 of 1 files at r4, 1 of 1 files at r5, 2 of 2 files at r6.
Reviewable status: 4 of 8 files reviewed, 1 unresolved discussion (waiting on @dlon and @pinkisemils)


build.sh line 209 at r7 (raw file):

    local current_target=${1:-""}
    local for_target_string=""
    local stripbin="strip"

I presume this script wouldn't be supposed to be ran on anything but our own build machines? Because if it was running on an ARM host, then it would be nice if the strip binary could be specified via an environment variable or via some other way. Or the script could just detect that and use regular strip instead of the cross-compiled one. Or am I horribly misinterpreting what's going on here? 😅

Copy link
Collaborator

@pinkisemils pinkisemils left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aside from the strip path, this :lgtm_strong: !

Reviewed 1 of 1 files at r7, 1 of 1 files at r8, 1 of 1 files at r9, 1 of 1 files at r10, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @dlon)

Copy link
Member Author

@dlon dlon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 7 of 8 files reviewed, 1 unresolved discussion (waiting on @pinkisemils)


build.sh line 209 at r7 (raw file):

Previously, pinkisemils (Emīls Piņķis) wrote…

I presume this script wouldn't be supposed to be ran on anything but our own build machines? Because if it was running on an ARM host, then it would be nice if the strip binary could be specified via an environment variable or via some other way. Or the script could just detect that and use regular strip instead of the cross-compiled one. Or am I horribly misinterpreting what's going on here? 😅

Done. You don't have to specify TARGETS if host equals the target, but it should work regardless.

@dlon dlon force-pushed the linux-aarch64-build branch from 98cf533 to af03e57 Compare August 23, 2022 07:55
Copy link
Collaborator

@pinkisemils pinkisemils left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 3 of 3 files at r11, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @dlon)


build.sh line 214 at r11 (raw file):

        local arch="$(uname -m)"
        if [[ "$current_target" == "aarch64-unknown-linux-gnu" && "${arch,,}" != "aarch64" ]]; then

I think in this case the arch variable might well be inlined like "$(uname -m)" != "aarch64".

@dlon dlon force-pushed the linux-aarch64-build branch from af03e57 to d8363be Compare August 23, 2022 08:12
Copy link
Collaborator

@pinkisemils pinkisemils left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 1 files at r12, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @dlon)

@dlon dlon force-pushed the linux-aarch64-build branch from d8363be to 2b68550 Compare August 23, 2022 11:39
@dlon dlon merged commit 7dc36e0 into master Aug 23, 2022
@dlon dlon deleted the linux-aarch64-build branch August 23, 2022 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants