Ubuntu 加速编译Android设置ccache缓存

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/wwdlss/article/details/80452373

一、安装工具:sudo apt-get install ccache

二、使用:

    1.ccache -s 查看状态。

    cache directory                     /home/wonder/.ccache
    primary config                      /home/wonder/.ccache/ccache.conf
    secondary config      (readonly)    /etc/ccache.conf
    cache hit (direct)                     0
    cache hit (preprocessed)               0
    cache miss                          4060
    called for link                        8
    unsupported source language          281
    files in cache                     12276
    cache size                         286.3 MB

    max cache size                      50.0 GB

    2.ccache -c 清除

三、配置:

    根据以上状态,编辑 /home/wonder/.bashrc

    在文件后加入 export USE_CCACHE=1 ,保存后记得source一下。

四、在你打android源码根目录下 执行 prebuilts/misc/linux-x86/ccache/ccache -M 50G ,分配50G。

然后就可以起飞啦。




猜你喜欢

转载自blog.csdn.net/wwdlss/article/details/80452373