mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-09-03 19:30:09 +00:00
Turn off exceptions to reduce binary size (-600KB for arm64) (#1033)
* Turn off exceptions to reduce binary size * Changelog
This commit is contained in:
parent
f2912ecb48
commit
6ed5ba29f8
@ -2738,7 +2738,11 @@
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
MODULEMAP_FILE = Source/AsyncDisplayKit.modulemap;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
OTHER_CFLAGS = "-Wundef";
|
||||
OTHER_CFLAGS = (
|
||||
"-Wundef",
|
||||
"-fno-exceptions",
|
||||
"-fno-objc-arc-exceptions",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = AsyncDisplayKit;
|
||||
SKIP_INSTALL = YES;
|
||||
@ -2767,7 +2771,11 @@
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
MODULEMAP_FILE = Source/AsyncDisplayKit.modulemap;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
OTHER_CFLAGS = "-Wundef";
|
||||
OTHER_CFLAGS = (
|
||||
"-Wundef",
|
||||
"-fno-exceptions",
|
||||
"-fno-objc-arc-exceptions",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = AsyncDisplayKit;
|
||||
SKIP_INSTALL = YES;
|
||||
@ -2881,7 +2889,11 @@
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
MODULEMAP_FILE = Source/AsyncDisplayKit.modulemap;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
OTHER_CFLAGS = "-Wundef";
|
||||
OTHER_CFLAGS = (
|
||||
"-Wundef",
|
||||
"-fno-exceptions",
|
||||
"-fno-objc-arc-exceptions",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = AsyncDisplayKit;
|
||||
SKIP_INSTALL = YES;
|
||||
|
2
BUCK
2
BUCK
@ -4,6 +4,8 @@
|
||||
COMMON_PREPROCESSOR_FLAGS = [
|
||||
'-fobjc-arc',
|
||||
'-DDEBUG=1',
|
||||
'-fno-exceptions',
|
||||
'-fno-objc-arc-exceptions'
|
||||
]
|
||||
|
||||
COMMON_LANG_PREPROCESSOR_FLAGS = {
|
||||
|
@ -22,6 +22,7 @@
|
||||
- Enable locking assertions (and add some more) to improve and enforce locking safety within the framework [Huy Nguyen](https://github.com/nguyenhuy) [#1024](https://github.com/TextureGroup/Texture/pull/1024)
|
||||
- Split MapKit, Photos, and AssetsLibrary dependent code into separate subspecs to improve binary size and start time when they're not needed. The default subspec includes all three for backwards compatibility, but this **will change in 3.0**. When using non-Cocoapods build environments, define `AS_USE_PHOTOS, AS_USE_MAPKIT, AS_USE_ASSETS_LIBRARY` to 1 respectively to signal their use. [Adlai Holler](https://github.com/Adlai-Holler)
|
||||
- Optimization: Removed an NSMutableArray in flattened layouts. [Adlai Holler](https://github.com/Adlai-Holler)
|
||||
- Reduced binary size by disabling exception support (which we don't use.) [Adlai Holler](https://github.com/Adlai-Holler)
|
||||
|
||||
## 2.7
|
||||
- Fix pager node for interface coalescing. [Max Wang](https://github.com/wsdwsd0829) [#877](https://github.com/TextureGroup/Texture/pull/877)
|
||||
|
@ -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, ...)
|
||||
#define ASSetDebugNames(...)
|
||||
#endif
|
||||
|
||||
|
@ -16,6 +16,7 @@ Pod::Spec.new do |spec|
|
||||
|
||||
# Subspecs
|
||||
spec.subspec 'Core' do |core|
|
||||
core.compiler_flags = '-fno-exceptions -fno-objc-arc-exceptions'
|
||||
core.public_header_files = [
|
||||
'Source/*.h',
|
||||
'Source/Details/**/*.h',
|
||||
|
Loading…
x
Reference in New Issue
Block a user