Closed weizhoufeng closed 4 years ago
1) 通过 cmake 构建时, 可以增加如下参数.
-DCMAKE_BUILD_TYPE=XXX
Debug # Setup for easy debugging. No optimizations.
DebugOpt # An optimized version of Debug.
Release # Fully optimized, no debugging information.
RelWithDebInfo # A debuggable version of Release.
MinSizeRel # Like Release, but optimized for memory rather than speed.
2) 还可以增加一些 选项, 禁用部分功能
OSS_DISABLE_BUCKET (Default OFF) If turned ON, the SDK is built without the bucket's API. cmake .. -DOSS_DISABLE_BUCKET=ON
OSS_DISABLE_LIVECHANNEL (Default OFF) If turned ON, the SDK is built without the livechannel's API. cmake .. -DOSS_DISABLE_LIVECHANNEL=ON
OSS_DISABLE_RESUAMABLE (Default OFF) If turned ON, the SDK is built without the resumable operation feature. cmake .. -DOSS_DISABLE_RESUAMABLE=ON
OSS_DISABLE_ENCRYPTION (Default OFF) If turned ON, the SDK is built without the client-side encryption feature. cmake .. -DOSS_DISABLE_ENCRYPTION=ON
目标安卓打包出来的静态库是目标Mac打出来的5倍大,解压静态库取出相同一个.o对比,elf 格式比 mach-o 大5倍
在Mac 上打包,采用Mac 系统打包方式
打包出来19MB
给安卓打包
打包出来有104MB,用gstrip 去掉debug info之后还有46MB