iOS开发——Xcode编译过程解析

Xcode

加入到新的团队后,首先发现的问题就是项目编译速度太慢了!简直慢到令人发指,什么概念呢,当你修改了项目的配置文件或者重新 pod install 或者其他改动,导致工程触发全量编译时,编译时间居然在30分~40分钟不等!

虽然以前了解过一些编译优化的工作,但没有亲自参与过,这一次也算是亲自实践了。比较明确的是,在进行优化之前,首先要做的一定是深入研究一下 Xcode 的编译过程,找到导致工程编译慢的罪魁祸首,对症下药方能解决问题。

一个简单的 Demo

为了方便辅助介绍 Xcode 的编译过程,用 Xcode 创建一个简单的 single view app,考虑到采用 Cocoapods 进行第三方库管理已经成了几乎所有 iOS 项目的标配,我这里使用本地源码创建的一个本地 pod 来实验。Log 目录下存在一个 TestLog.podpec 的文件,执行 pod install 后,就得到的集成后的工程,工程结构如下图所示:


Demo 结构

注,Podfile 和 podspec 均使用官方命令产出:

pod init
pod spec create TestLog

页面启动后调用 XcodeLog 的类方法:+[XcodeLog log],打印一行日志:


运行 Demo

ok,Demo 准备好了,也运行起来了,我们一起看下编译它过程。

Demo 编译过程

Xcode 非常的强大,强大到整个编译细节你都可以看到!


消息报告工具

于是,我们 cmd + B 后,看到详细的编译日志:


编译流程

流程大致分为:

  • 编译 TestLog 这个 Target
  • 编译 Pods-XcodeDemo 这个 Target
  • 编译 XcodeDemo 这个主工程
  • 编译完成

默认情况下,上面细节的界面隐藏了大量编译信息,我们可以通过点击每一条单独的任务进行展开,更详细的信息就在这里面了。


编译详细

Target 编译

  1. Write auxiliary files
    生成一些辅助文件,主要是 .hmap、LinkFileList 文件,用于辅助执行编译用的,可以提高二次编译速度。
Write auxiliary files

write-file /Users/ranger/Library/Developer/Xcode/DerivedData/XcodeDemo-fmyuqhxixlpjqqdzsflmuzdvhmgt/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/TestLog.build/TestLog-all-target-headers.hmap
write-file /Users/ranger/Library/Developer/Xcode/DerivedData/XcodeDemo-fmyuqhxixlpjqqdzsflmuzdvhmgt/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/TestLog.build/TestLog-generated-files.hmap
/bin/mkdir -p /Users/ranger/Library/Developer/Xcode/DerivedData/XcodeDemo-fmyuqhxixlpjqqdzsflmuzdvhmgt/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/TestLog.build/Objects-normal/x86_64
write-file /Users/ranger/Library/Developer/Xcode/DerivedData/XcodeDemo-fmyuqhxixlpjqqdzsflmuzdvhmgt/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/TestLog.build/Objects-normal/x86_64/TestLog.LinkFileList
write-file /Users/ranger/Library/Developer/Xcode/DerivedData/XcodeDemo-fmyuqhxixlpjqqdzsflmuzdvhmgt/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/TestLog.build/TestLog-own-target-headers.hmap
write-file /Users/ranger/Library/Developer/Xcode/DerivedData/XcodeDemo-fmyuqhxixlpjqqdzsflmuzdvhmgt/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/TestLog.build/TestLog.hmap
write-file /Users/ranger/Library/Developer/Xcode/DerivedData/XcodeDemo-fmyuqhxixlpjqqdzsflmuzdvhmgt/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/TestLog.build/TestLog-project-headers.hmap
write-file /Users/ranger/Library/Developer/Xcode/DerivedData/XcodeDemo-fmyuqhxixlpjqqdzsflmuzdvhmgt/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/TestLog.build/TestLog-all-non-framework-target-headers.hmap
  1. 编译 .m 文件
    .m 是主要的源文件,经过预编译操作后,这里的 .m 是展开后的,可以独立编译生成最后的 .o 文件。
    这里 CompileC 命令和 clang 命令
CompileC /Users/ranger/Library/Developer/Xcode/DerivedData/XcodeDemo-fmyuqhxixlpjqqdzsflmuzdvhmgt/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/TestLog.build/Objects-normal/x86_64/XcodeLog.o /Users/ranger/tmp/XcodeDemo/XcodeDemo/Log/XcodeLog.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/ranger/tmp/XcodeDemo/Pods
export LANG=en_US.US-ASCII
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch x86_64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu11 -fobjc-arc -fobjc-weak -fmodules -fmodules-cache-path=/Users/ranger/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/Users/ranger/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wdocumentation -Wunreachable-code -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-arc-repeated-use-of-weak -Wimplicit-retain-self -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wdeprecated-implementations -DPOD_CONFIGURATION_DEBUG=1 -DDEBUG=1 -DCOCOAPODS=1 -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk -fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -mios-simulator-version-min=9.0 -g -Wno-sign-conversion -Winfinite-recursion -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wunguarded-availability -fobjc-abi-version=2 -fobjc-legacy-dispatch -index-store-path /Users/ranger/Library/Developer/Xcode/DerivedData/XcodeDemo-fmyuqhxixlpjqqdzsflmuzdvhmgt/Index/DataStore -iquote /Users/ranger/Library/Developer/Xcode/DerivedData/XcodeDemo-fmyuqhxixlpjqqdzsflmuzdvhmgt/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/TestLog.build/TestLog-generated-files.hmap -I/Users/ranger/Library/Developer/Xcode/DerivedData/XcodeDemo-fmyuqhxixlpjqqdzsflmuzdvhmgt/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/TestLog.build/TestLog-own-target-headers.hmap -I/Users/ranger/Library/Developer/Xcode/DerivedData/XcodeDemo-fmyuqhxixlpjqqdzsflmuzdvhmgt/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/TestLog.build/TestLog-all-target-headers.hmap -iquote /Users/ranger/Library/Developer/Xcode/DerivedData/XcodeDemo-fmyuqhxixlpjqqdzsflmuzdvhmgt/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/TestLog.build/TestLog-project-headers.hmap -I/Users/ranger/Library/Developer/Xcode/DerivedData/XcodeDemo-fmyuqhxixlpjqqdzsflmuzdvhmgt/Build/Products/Debug-iphonesimulator/TestLog/include -I/Users/ranger/tmp/XcodeDemo/Pods/Headers/Private -I/Users/ranger/tmp/XcodeDemo/Pods/Headers/Private/TestLog -I/Users/ranger/tmp/XcodeDemo/Pods/Headers/Public -I/Users/ranger/tmp/XcodeDemo/Pods/Headers/Public/TestLog -I/Users/ranger/Library/Developer/Xcode/DerivedData/XcodeDemo-fmyuqhxixlpjqqdzsflmuzdvhmgt/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/TestLog.build/DerivedSources/x86_64 -I/Users/ranger/Library/Developer/Xcode/DerivedData/XcodeDemo-fmyuqhxixlpjqqdzsflmuzdvhmgt/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/TestLog.build/DerivedSources -F/Users/ranger/Library/Developer/Xcode/DerivedData/XcodeDemo-fmyuqhxixlpjqqdzsflmuzdvhmgt/Build/Products/Debug-iphonesimulator/TestLog -include /Users/ranger/tmp/XcodeDemo/Pods/Target\ Support\ Files/TestLog/TestLog-prefix.pch -MMD -MT dependencies -MF /Users/ranger/Library/Developer/Xcode/DerivedData/XcodeDemo-fmyuqhxixlpjqqdzsflmuzdvhmgt/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/TestLog.build/Objects-normal/x86_64/XcodeLog.d --serialize-diagnostics /Users/ranger/Library/Developer/Xcode/DerivedData/XcodeDemo-fmyuqhxixlpjqqdzsflmuzdvhmgt/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/TestLog.build/Objects-normal/x86_64/XcodeLog.dia -c /Users/ranger/tmp/XcodeDemo/XcodeDemo/Log/XcodeLog.m -o /Users/ranger/Library/Developer/Xcode/DerivedData/XcodeDemo-fmyuqhxixlpjqqdzsflmuzdvhmgt/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/TestLog.build/Objects-normal/x86_64/XcodeLog.o
  1. 编译 xxx-dummy.m 文件
    xxx-dummy.m 文件是 CocoaPods 使用的用于区分不同 pod 的编译文件,每个第三方库有不同的 target,所以每次编译第三方库时,都会新增几个文件:包含编译选项的.xcconfig文件,同时拥有编译设置和 CocoaPods 配置的私有 .xcconfig 文件,编译所必须的prefix.pch文件以及编译必须的文件 dummy.m
CompileC /Users/ranger/Library/Developer/Xcode/DerivedData/XcodeDemo-fmyuqhxixlpjqqdzsflmuzdvhmgt/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/TestLog.build/Objects-normal/x86_64/TestLog-dummy.o Target\ Support\ Files/TestLog/TestLog-dummy.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/ranger/tmp/XcodeDemo/Pods
export LANG=en_US.US-ASCII
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch x86_64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu11 -fobjc-arc -fobjc-weak -fmodules -fmodules-cache-path=/Users/ranger/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/Users/ranger/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wdocumentation -Wunreachable-code -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-arc-repeated-use-of-weak -Wimplicit-retain-self -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wdeprecated-implementations -DPOD_CONFIGURATION_DEBUG=1 -DDEBUG=1 -DCOCOAPODS=1 -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk -fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -mios-simulator-version-min=9.0 -g -Wno-sign-conversion -Winfinite-recursion -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wunguarded-availability -fobjc-abi-version=2 -fobjc-legacy-dispatch -index-store-path /Users/ranger/Library/Developer/Xcode/DerivedData/XcodeDemo-fmyuqhxixlpjqqdzsflmuzdvhmgt/Index/DataStore -iquote /Users/ranger/Library/Developer/Xcode/DerivedData/XcodeDemo-fmyuqhxixlpjqqdzsflmuzdvhmgt/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/TestLog.build/TestLog-generated-files.hmap -I/Users/ranger/Library/Developer/Xcode/DerivedData/XcodeDemo-fmyuqhxixlpjqqdzsflmuzdvhmgt/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/TestLog.build/TestLog-own-target-headers.hmap -I/Users/ranger/Library/Developer/Xcode/DerivedData/XcodeDemo-fmyuqhxixlpjqqdzsflmuzdvhmgt/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/TestLog.build/TestLog-all-target-headers.hmap -iquote /Users/ranger/Library/Developer/Xcode/DerivedData/XcodeDemo-fmyuqhxixlpjqqdzsflmuzdvhmgt/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/TestLog.build/TestLog-project-headers.hmap -I/Users/ranger/Library/Developer/Xcode/DerivedData/XcodeDemo-fmyuqhxixlpjqqdzsflmuzdvhmgt/Build/Products/Debug-iphonesimulator/TestLog/include -I/Users/ranger/tmp/XcodeDemo/Pods/Headers/Private -I/Users/ranger/tmp/XcodeDemo/Pods/Headers/Private/TestLog -I/Users/ranger/tmp/XcodeDemo/Pods/Headers/Public -I/Users/ranger/tmp/XcodeDemo/Pods/Headers/Public/TestLog -I/Users/ranger/Library/Developer/Xcode/DerivedData/XcodeDemo-fmyuqhxixlpjqqdzsflmuzdvhmgt/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/TestLog.build/DerivedSources/x86_64 -I/Users/ranger/Library/Developer/Xcode/DerivedData/XcodeDemo-fmyuqhxixlpjqqdzsflmuzdvhmgt/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/TestLog.build/DerivedSources -F/Users/ranger/Library/Developer/Xcode/DerivedData/XcodeDemo-fmyuqhxixlpjqqdzsflmuzdvhmgt/Build/Products/Debug-iphonesimulator/TestLog -include /Users/ranger/tmp/XcodeDemo/Pods/Target\ Support\ Files/TestLog/TestLog-prefix.pch -MMD -MT dependencies -MF /Users/ranger/Library/Developer/Xcode/DerivedData/XcodeDemo-fmyuqhxixlpjqqdzsflmuzdvhmgt/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/TestLog.build/Objects-normal/x86_64/TestLog-dummy.d --serialize-diagnostics /Users/ranger/Library/Developer/Xcode/DerivedData/XcodeDemo-fmyuqhxixlpjqqdzsflmuzdvhmgt/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/TestLog.build/Objects-normal/x86_64/TestLog-dummy.dia -c /Users/ranger/tmp/XcodeDemo/Pods/Target\ Support\ Files/TestLog/TestLog-dummy.m -o /Users/ranger/Library/Developer/Xcode/DerivedData/XcodeDemo-fmyuqhxixlpjqqdzsflmuzdvhmgt/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/TestLog.build/Objects-normal/x86_64/TestLog-dummy.o
  1. 创建静态库
    创建当前架构的静态库,例如栗子中用的是模拟器,对应的是 x86_64 架构。
Libtool /Users/ranger/Library/Developer/Xcode/DerivedData/XcodeDemo-fmyuqhxixlpjqqdzsflmuzdvhmgt/Build/Products/Debug-iphonesimulator/TestLog/libTestLog.a normal x86_64
cd /Users/ranger/tmp/XcodeDemo/Pods
export IPHONEOS_DEPLOYMENT_TARGET=9.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -static -arch_only x86_64 -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk -L/Users/ranger/Library/Developer/Xcode/DerivedData/XcodeDemo-fmyuqhxixlpjqqdzsflmuzdvhmgt/Build/Products/Debug-iphonesimulator/TestLog -filelist /Users/ranger/Library/Developer/Xcode/DerivedData/XcodeDemo-fmyuqhxixlpjqqdzsflmuzdvhmgt/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/TestLog.build/Objects-normal/x86_64/TestLog.LinkFileList -o /Users/ranger/Library/Developer/Xcode/DerivedData/XcodeDemo-fmyuqhxixlpjqqdzsflmuzdvhmgt/Build/Products/Debug-iphonesimulator/TestLog/libTestLog.a
  1. 拷贝头文件
    将所有的头文件拷贝到 Pods 目录对应的 pod 里,没有头文件配合使用的二进制库是不能使用的。
CpHeader /Users/ranger/tmp/XcodeDemo/XcodeDemo/Log/XcodeLog.h /Users/ranger/Library/Developer/Xcode/DerivedData/XcodeDemo-fmyuqhxixlpjqqdzsflmuzdvhmgt/Build/Products/Debug-iphonesimulator/TestLog/XcodeLog.h
cd /Users/ranger/tmp/XcodeDemo/Pods
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -resolve-src-symlinks /Users/ranger/tmp/XcodeDemo/XcodeDemo/Log/XcodeLog.h /Users/ranger/Library/Developer/Xcode/DerivedData/XcodeDemo-fmyuqhxixlpjqqdzsflmuzdvhmgt/Build/Products/Debug-iphonesimulator/TestLog
  1. 拷贝资源文件(如果有)

主工程编译

  1. Write auxiliary files
  2. Process product packaging
  3. 执行 cocoapods 资源拷贝脚本
  4. 编译 .m 文件
  5. 链接静态库
  6. 编译资源文件
  7. Process info.plist file
  8. 执行 cocoapods 资源拷贝脚本
  9. 创建 .app
  10. 打包及签名

仔细观察

我们知道,XcodeDemo 是工程的主 Target,那 TestLog 和 Pods-XcodeDemo 是哪儿来的呢?
嗯,了解 CocoaPods 原理的同学都知道,CocoaPods 创建了 Pods 工程,引入新的工程来隐藏第三方库的依赖,从而管理第三方 pods。简单说就是主工程依赖 Pods 工程,Pods 工程依赖子
pods,从而间接被主工程依赖。而新的 Target 就是 CocoaPods 创建的。

仔细观察编译过程,我们会发现,除了主工程直接生成最终的 .app 外,其他工程(Target)都会编译成一个静态库被主工程去 Link,如果某个工程特别大,包含众多的 .m 文件或者其他资源文件,那么 Xcode 就会花费较多的时间去编译。


创建静态库1

创建静态库2

而在 Link 阶段,Xcode 会将前面创建的所有二进制文件做一次链接得到最后的二进制包

Ld /Users/ranger/Library/Developer/Xcode/DerivedData/XcodeDemo-fmyuqhxixlpjqqdzsflmuzdvhmgt/Build/Products/Debug-iphonesimulator/XcodeDemo.app/XcodeDemo normal x86_64
cd /Users/ranger/tmp/XcodeDemo
export IPHONEOS_DEPLOYMENT_TARGET=9.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk -L/Users/ranger/Library/Developer/Xcode/DerivedData/XcodeDemo-fmyuqhxixlpjqqdzsflmuzdvhmgt/Build/Products/Debug-iphonesimulator -L/Users/ranger/Library/Developer/Xcode/DerivedData/XcodeDemo-fmyuqhxixlpjqqdzsflmuzdvhmgt/Build/Products/Debug-iphonesimulator/TestLog -F/Users/ranger/Library/Developer/Xcode/DerivedData/XcodeDemo-fmyuqhxixlpjqqdzsflmuzdvhmgt/Build/Products/Debug-iphonesimulator -filelist /Users/ranger/Library/Developer/Xcode/DerivedData/XcodeDemo-fmyuqhxixlpjqqdzsflmuzdvhmgt/Build/Intermediates.noindex/XcodeDemo.build/Debug-iphonesimulator/XcodeDemo.build/Objects-normal/x86_64/XcodeDemo.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -mios-simulator-version-min=9.0 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/ranger/Library/Developer/Xcode/DerivedData/XcodeDemo-fmyuqhxixlpjqqdzsflmuzdvhmgt/Build/Intermediates.noindex/XcodeDemo.build/Debug-iphonesimulator/XcodeDemo.build/Objects-normal/x86_64/XcodeDemo_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -ObjC -lTestLog -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker /Users/ranger/Library/Developer/Xcode/DerivedData/XcodeDemo-fmyuqhxixlpjqqdzsflmuzdvhmgt/Build/Intermediates.noindex/XcodeDemo.build/Debug-iphonesimulator/XcodeDemo.build/XcodeDemo.app-Simulated.xcent -lPods-XcodeDemo -Xlinker -dependency_info -Xlinker /Users/ranger/Library/Developer/Xcode/DerivedData/XcodeDemo-fmyuqhxixlpjqqdzsflmuzdvhmgt/Build/Intermediates.noindex/XcodeDemo.build/Debug-iphonesimulator/XcodeDemo.build/Objects-normal/x86_64/XcodeDemo_dependency_info.dat -o /Users/ranger/Library/Developer/Xcode/DerivedData/XcodeDemo-fmyuqhxixlpjqqdzsflmuzdvhmgt/Build/Products/Debug-iphonesimulator/XcodeDemo.app/XcodeDemo

整体流程大概就是这样,即使再复杂的工程,也是类似的流程和操作。

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 159,569评论 4 363
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 67,499评论 1 294
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 109,271评论 0 244
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 44,087评论 0 209
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 52,474评论 3 287
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 40,670评论 1 222
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 31,911评论 2 313
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 30,636评论 0 202
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 34,397评论 1 246
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 30,607评论 2 246
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 32,093评论 1 261
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 28,418评论 2 254
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 33,074评论 3 237
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 26,092评论 0 8
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 26,865评论 0 196
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 35,726评论 2 276
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 35,627评论 2 270