加快Android单模块编译
16lz
2021-01-23
加快Android单模块编译
转载时请注明出处和作者联系方式
文章出处:http://www.limodev.cn/blog
作者联系方式:李先静 <xianjimli at hotmail dot com>
习惯了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登录模块
- 扩展Android框架功能和底层模块的技术要点
- Android 内核 - 00 Android模块及Linux 启动过程
- android 上层wifi模块调用分析
- android中的sqlit3数据库进行手机应用软件开发(自写的一个财务管
- Android Wifi模块分析(二)
- Android Wifi模块分析(三)
- android studio的问题整理(如何删除模块(Module))
- Windows环境下Android 源码模块下载