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

Reduce binary size #1

Open
dpwiz opened this issue Dec 31, 2020 · 3 comments
Open

Reduce binary size #1

dpwiz opened this issue Dec 31, 2020 · 3 comments

Comments

@dpwiz
Copy link

dpwiz commented Dec 31, 2020

For a cheap 3x reduction, add to stack.yaml:

ghc-options:
  "$everything": -split-sections

Throw in upx -9 for extra 5x shrinking.

@rmehri01
Copy link
Owner

@dpwiz Oh okay cool I didn't know about this, thanks!

@rmehri01
Copy link
Owner

rmehri01 commented Jan 1, 2021

I tried it locally with -split-sections on macOS and also got the same as @soywod:

ghc: on the commandline: -split-sections is not useful on this platform since it always uses subsections via symbols.

This was fixed here so I could up the ghc version but I think it would need to be on Stackage nightly, any suggestions?

@rmehri01
Copy link
Owner

rmehri01 commented Jan 1, 2021

I'm getting this error with upx on macOS (both locally and on GitHub actions) so I guess I'm going to have to hold off on this for a little bit.

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

No branches or pull requests

2 participants