-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Turn off exceptions to reduce binary size (-600KB for arm64) #1033
Conversation
🚫 CI failed with log |
The CI is just plain broken =/ |
@@ -30,7 +30,7 @@ | |||
#define ASSetDebugName(node, format, ...) node.debugName = [NSString stringWithFormat:format, __VA_ARGS__] | |||
#define ASSetDebugNames(...) _ASSetDebugNames(self.class, @"" # __VA_ARGS__, __VA_ARGS__, nil) | |||
#else | |||
#define ASSetDebugName(node, name) | |||
#define ASSetDebugName(node, format, ...) |
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.
This was breaking release builds. I guess nobody uses this macro!!
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.
Strong win!
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.
Nice!
…Group#1033) * Turn off exceptions to reduce binary size * Changelog
We don't currently use exceptions so we don't need the extra binary to support them.
-fno-exceptions
removes unwind tables and makes C++ STL put "abort" wherever there would be an exception.-fno-objc-arc-exceptions
removes code that ARC adds to prevent leaks in the case of exceptions https://clang.llvm.org/docs/AutomaticReferenceCounting.html#exceptionsHow big is the win?
So modulo any Apple fiddling with your binary, the 64-bit one should shrink by about 600KB.