转载时请注明出处和作者
作者 :李先静
习惯了automake之后,再用Android的编译系统,就是感觉不爽。编译一个小模块也等上几分钟,有次实在受不了,看了一下它的实现,发现它对任何一次编译都要查找所有的Android.mk:
subdir_makefiles=$(shell cat build/tools/Android.mk.cache)
我把build/core/main.mk修改了一下,增加了一个cache:
subdir_makefiles=$(shell cat build/tools/Android.mk.cache)
ifeq ($(subdir_makefiles),)
$(info "no cache. create build/tools/Android.mk.cache")
$(shell build/tools/findleaves.sh --prune="./out" . Android.mk > build/tools/Android.mk.cache)
subdir_makefiles=$(shell cat build/tools/Android.mk.cache)
else
$(info "use cache: build/tools/Android.mk.cache")
endif
速度终于可以接受了。
加快Android单模块编译
原创
©著作权归作者所有:来自51CTO博客作者ZLG李先静的原创作品,请联系作者获取转载授权,否则将追究法律责任
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
Android编译解决:Missing classes detected while running R8.
Android编译相关问题解决
Android 代码混淆 配置文件 -
Android 模块编译
Android 模块编译
android 编译 Android App 根目录 -
加快android studio 编译速度
加快android studio 编译速度
android 资源文件 jar 编译器 ide