taiki-e / upload-rust-binary-action

GitHub Action for building and uploading Rust binary to GitHub Releases.
Apache License 2.0
235 stars 20 forks source link

Cannot strip ARM binaries #8

Closed Shadow53 closed 2 years ago

Shadow53 commented 2 years ago

I am using this action to cross-compile a CLI application (called hoard) for multiple platforms. When compiling for the armv7-linux-androideabi target, I got the following error:

strip: Unable to recognise the format of the input file `hoard'

I am not sure if there is a way to strip these binaries or if stripping should be skipped for them, but either solution would be nice so I can distribute downloads for Android platforms.

Shadow53 commented 2 years ago

Update: Just got this with the aarch64-unknown-linux-gnu target, so I'm thinking this may be for ARM or even foreign architectures in general.

taiki-e commented 2 years ago

Thanks for the report!

We probably need to skip strip if a target with a different architecture than the host is specified.

Or, I think it is possible to make the strip work on those architectures, but it requires additional dependencies (e.g., on arm-linux-gnueabihf-strip via gcc-arm-linux-gnueabihf, aarch64-linux-gnu-strip via gcc-aarch64-linux-gnu). So it might be better to use them when they are available and warn when they are not.

taiki-e commented 2 years ago

Fixed in v1.1.0.