Ubuntu 加速编译Android设置ccache缓存

一、安装工具: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。

然后就可以起飞啦。




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值