ccache 和ndk 版本 (最新版本ccache-3.3.4 android-ndk-r10d)
1、安装ccache
2、配置~/.bash_profile
export NDK_CCACHE=ccache
export USE_CCACHE=1
export CCACHE_LOGFILE='/Users/zt-2205515/Desktop/ccache.log'
3、修改 android-ndk-r10d/build/core/default-build-commands.mk 使用ccache 命令
4、使用ccache -s查看命中等情况
查看到cache hit rate 、 cache hit(preprocessed) 有值时,表示已经有文件ccache 成功。
(Tips: 第一次是全部编译,是cccahe全是失败的)
当后续还是cccahe 失败时,可通过CCACHE_LOGFILE 日志文件查看ccache 失败的原因(有些g++的编译参数不支持ccache,可能也会导致失败的)