-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
Allow to compress binaries with UPX #90
base: main
Are you sure you want to change the base?
Conversation
50f5c05
to
ee6f91a
Compare
Thanks for the PR! Could you add a test for this option? |
Added to CI in c7c5a13 |
.github/workflows/ci.yml
Outdated
@@ -99,6 +99,7 @@ jobs: | |||
codesign: '-' | |||
codesign-prefix: 'com.example.' | |||
codesign-options: 'runtime' | |||
upx: ${{ startsWith(matrix.os, 'ubuntu-') && matrix.target != 'x86_64-pc-windows-gnu' && matrix.target != 'aarch64-unknown-linux-gnu' }} |
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.
- Is the reason it doesn't work with aarch64 and windows-gnu because UPX doesn't support cross-compilation?
(It seems that aarch64 is supported? https://github.com/upx/upx/blob/d00ba4b4656837c08841bd8f9599fda87bb7c7d2/src/p_lx_elf.h#L533) - Is it intentional that this is only tested in linux? Have there been any problems when tested otherwise?
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.
See https://github.com/taiki-e/upload-rust-binary-action/actions/runs/12377523218/
Is the reason it doesn't work with aarch64 and windows-gnu because UPX doesn't support cross-compilation?
Is it intentional that this is only tested in linux? Have there been any problems when tested otherwise?
win64/arm64
is not yet supported- macOS is not supported
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.
Is the reason it doesn't work with aarch64 and windows-gnu because UPX doesn't support cross-compilation?
It seems to work with aarch64 linux-gnu + build-tool=cargo.
https://github.com/taiki-e/upload-rust-binary-action/actions/runs/12377523218/job/34547228655?pr=90
Is it intentional that this is only tested in linux? Have there been any problems when tested otherwise?
win64/arm64
is not yet supported- macOS is not supported
This doesn't seem to describe why x86_64 windows is skipped.
https://github.com/taiki-e/upload-rust-binary-action/actions/runs/12377523218/job/34547233333?pr=90
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 seems to work with aarch64 linux-gnu + build-tool=cargo.
Added.
This doesn't seem to describe why x86_64 windows is skipped.
The output of the file
command is the same when the exe is compressed with UPX or not:
./test-crate/target/release/test-crate.exe: PE32+ executable (console) x86-64 (stripped to external PDB), for MS Windows
See this run (compressing) and this run (not compressing). I don't know how to test it.
Co-authored-by: Taiki Endo <te316e89@gmail.com>
50ba508
to
74e34ce
Compare
Add
upx
option to compress binaries with UPX on Windows and Linux (see https://upx.github.io).Contributes to #6