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

Enabled build target for arm64 architecture #297

Merged
merged 4 commits into from
Sep 10, 2018

Conversation

rachitchokshi
Copy link
Contributor

This PR enables build for aarch64, solving issue #258

@rachitchokshi rachitchokshi changed the title Enabled build target aarch64-unknown-linux-gnu for arm64 architecture Enabled build target for arm64 architecture Sep 8, 2018
Cargo.toml Outdated
@@ -19,6 +19,7 @@ ansi_term = "0.11"
console = "0.6"
directories = "1.0"
lazy_static = "1.0"
libz-sys = "1.0.20"
Copy link
Owner

Choose a reason for hiding this comment

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

Why is this necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

When i was testing the build for the first time it was failing with error: failed to run custom build command for libz-sys v1.0.20. But right now i checked again and it takes care of it implicitly.

@sharkdp
Copy link
Owner

sharkdp commented Sep 9, 2018

Thank you very much! Could you add a short comment why including libz-sys explicitly is necessary?

@sharkdp
Copy link
Owner

sharkdp commented Sep 9, 2018

Another thing I just noticed: If you look at 3e09950, there is a change in deploy.bash where we need to call a different version of strip for the cross-compiled binary. I guess we need something analogous for aarch64.

@rachitchokshi
Copy link
Contributor Author

you are right @sharkdp ,sorry i did not test the deploy script properly as it required the release tag.
i will make necessary changes, test and get back soon.

@@ -19,6 +19,8 @@ pack() {

if [[ $TARGET == "arm-unknown-linux-gnueabihf" ]]; then
gcc_prefix="arm-linux-gnueabihf-"
elif [[ $TARGET == "aarch64-unknown-linux-gnu" ]]; then
gcc_prefix="aarch64-linux-gnu-"
Copy link
Owner

Choose a reason for hiding this comment

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

Did you test this? Is the prefix really aarch64-linux-gnu- and not aarch64-linux-gnueabihf- or similar?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it did execute successfully in my test release.
image
arm-unknown-linux-gnueabihf is for armhf architecture while aarch64-unknown-linux-gnu is for arm64.

Copy link
Owner

Choose a reason for hiding this comment

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

Thanks!

;;
aarch64*)
architecture=arm64
gcc_prefix="aarch64-linux-gnu-"
Copy link
Owner

Choose a reason for hiding this comment

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

Same here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it did execute successfully in my test release.

;;
i686*)
architecture=i386
gcc_prefix=""
;;
aarch64*)
Copy link
Owner

Choose a reason for hiding this comment

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

If this works, could we also enable this for arm?

Copy link
Contributor Author