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

Fix issue #3913 #3934

Merged
merged 15 commits into from May 8, 2022
Merged

Fix issue #3913 #3934

merged 15 commits into from May 8, 2022

Conversation

Halo-Michael
Copy link
Contributor

Fix #3913

@Halo-Michael Halo-Michael mentioned this pull request Apr 23, 2022
@Halo-Michael Halo-Michael reopened this Apr 23, 2022
@Halo-Michael
Copy link
Contributor Author

Halo-Michael commented Apr 26, 2022

Well, why binary build for arm64, ios_simulator does not have arm64 silce? @osy
CC: https://github.com/utmapp/UTM/runs/6138999484?check_suite_focus=true#step:9:3068

@osy
Copy link
Contributor

osy commented Apr 26, 2022

I'm not sure, it works fine though so maybe check the file and see what it contains?

@Halo-Michael
Copy link
Contributor Author

I'm not sure, it works fine though so maybe check the file and see what it contains?

UTM main binary have arm64 silce, but the framework does not.
K3(3V(IMVIWR 42$W}4N3

@Halo-Michael
Copy link
Contributor Author

I guess we can only lipo for non-simulator build.

@Halo-Michael
Copy link
Contributor Author

Okey, that's it, the script will cut useless architectures for macOS/iOS now.

@Halo-Michael
Copy link
Contributor Author

@osy Can you please verify the pull request? Thanks.

@osy osy added this to the v3.2 milestone Apr 29, 2022
@osy
Copy link
Contributor

osy commented May 2, 2022

I'm pretty sure this breaks macOS universal which has both x86_64 and arm64.

Also why are you looking at */Frameworks/*.framework I don't think there's any fat binaries there?

Overall I see the space reduced by 10% to 746MB for iOS. Is that really that big of a deal?

@Halo-Michael
Copy link
Contributor Author

Halo-Michael commented May 4, 2022

I'm pretty sure this breaks macOS universal which has both x86_64 and arm64.

Also why are you looking at */Frameworks/*.framework I don't think there's any fat binaries there?

Overall I see the space reduced by 10% to 746MB for iOS. Is that really that big of a deal?

That sounds weried but only remove arm64e silce is not enough to change a fat file into non-fat file, it's still a "fat file" even it may only have one silce:
34ACE7E2-3C14-404F-B96A-0B908F34F057
I guess we can only cut useless silce for iOS?

@osy
Copy link
Contributor

osy commented May 4, 2022

So is there any reason to include .framework?

@Halo-Michael
Copy link
Contributor Author

So is there any reason to include .framework?

E80FCE81-25B7-46D1-AC6A-DE0510787A5D

@Halo-Michael
Copy link
Contributor Author

So is there any reason to include .framework?

E80FCE81-25B7-46D1-AC6A-DE0510787A5D

Fat binary probably takes up a full 16K as a page table or something else, so why not?

@osy osy merged commit 0cc8f1a into utmapp:master May 8, 2022
@conath
Copy link
Contributor

conath commented May 9, 2022

Thanks @Halo-Michael file size is important. 👏

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.

Reduce dynamic library binary size
3 participants