首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏C++技术干货

    ccache让 C++ 编译速度飞起来

    通过源码安装:从ccache的官方网站下载最新版本的ccache源代码压缩包。 /configure make sudo make install查看ccache版本:ccache -V 2.2、ccache的配置选项和参数ccache具有丰富的配置选项和参数,可以通过配置文件或命令行参数进行设置 ccache提供了查询缓存命中能力更好的判断当前工程有没有使用ccache:ccache -s -v输出:root@hecs-274489:~/workspace/learning# ccache -s 将编译命令前加上ccache,例如:CC=ccache gcc CXX=ccache g++(2)在CMake中使用ccache。 /configure脚本时ccache将被自动启用。(4)在Visual Studio中使用ccache安装并配置ccache工具。在Visual Studio中设置包含ccache的路径。

    1.8K10编辑于 2025-05-05
  • 来自专栏腾讯大讲堂的专栏

    全民K歌后台编译优化:从40分钟到30秒

    ,另外考虑到要尽可能减少磁盘的使用,所以把代码和ccacheccache目录都设置到了tmpfs上 实施过程 在五台开发机上分别安装ccache+distcc 1. 下载安装ccache #!/bin/shtar -xvf ccache-3.2.4.tar.gzcd ccache-3.2.4. .ccache”>>/data/home/user_00/.ccache/ccache.conf 遇到的问题 1.不并行编译ok,并行编译就出错 目标依赖关系设置有问题,导致各个目标都并行在编译,比如有 g++的效果会比使用ccache g++然后再设置环境变量CCACHE_PREFIX=distcc 的效果要差。 ccache的文件分发到其它机器去编译了 优化结果 完全没有ccache的情况下第一次编译:2分30秒左右 ?

    2K50发布于 2018-02-13
  • 来自专栏Pou光明

    如何提高工程编译速度

    2.1 提高单机编译能力 多核编译 make -j* #减少重复编译相同代码的时间 ccache 解决IO瓶颈,充分利用内存资源,头文件非常多,预处理时需要反复从磁盘读取文件 tmpfs 2.2 icecc : distcc升级版 Qt多核编译与ccache使用具体操作流程 1 Qt 设置多核编译 Qt侧边栏 Projects -> Build -> Build Steps ? 2 ccache 安装及配置步骤 2.1 ccache安装 sudo apt-get install ccache ccache -V 可查看是否安装成功 安装完成后默认缓存路径为~/.ccache ,默认缓存空间配置为5G 2.2 Qt中配置ccache #Qt pro中添加 equals(COMPILE,2){ QMAKE_CXX = ccache g++ } 需在Qt->Projects 注:使用软链接、配置环境变量等方式无法完成Qt自动使用ccache,qmake生成的Makefile中未使用ccache.

    2.4K20发布于 2021-04-09
  • 来自专栏QQ音乐技术团队的专栏

    全民K歌后台编译优化:从40分钟到30秒

    ,另外考虑到要尽可能减少磁盘的使用,所以把代码和ccacheccache目录都设置到了tmpfs上 实施过程: 在五台开发机上分别安装ccache+distcc 1. 下载安装ccache #!/bin/sh tar -xvf ccache-3.2.4.tar.gz cd ccache-3.2.4 . /.ccache”>>/data/home/user_00/.ccache/ccache.conf 遇到的问题: 1.不并行编译ok,并行编译就出错 目标依赖关系设置有问题,导致各个目标都并行在编译, g++的效果会比使用ccache g++然后再设置环境变量CCACHE_PREFIX=distcc 的效果要差。 ccache的文件分发到其它机器去编译了 优化结果: 完全没有ccache的情况下第一次编译:2分30秒左右 ?

    1.6K70发布于 2018-01-30
  • 来自专栏JavaEdge

    优雅地在Mac OS Catalina下 编译 Open JDK 13

    1 系统环境 Xcode Oracle JDK: 13 先确保系统已安装freetype和ccache freetype: 2.9 ccache: 3.3.5 $ brew install freetype ccache 2 下载源码 通过Mercurial代码管理版本管理工具从Repository中直接获取源码(Repository为http://hg.openjdk.java.net) 3 自动检测依赖 enable-dtrace 启用dtrace --with-jvm-variants=server 编译server类型JVM --with-target-bits=64 指定JVM为64位 --enable-ccache 启用ccache,加快编译 --with-num-cores=8 编译使用CPU核心数 --with-memory-size=8000 编译使用内存 --disable-warnings-as-errors with-debug-level=slowdebug --enable-dtrace --with-jvm-variants=server --with-target-bits=64 --enable-ccache

    1.9K11发布于 2019-10-17
  • 来自专栏along的开发之旅

    Ascend 910b上 paddle安装及运行报错排查

    You can download and install ccache from: https://github.com/ccache/ccache/blob/master/doc/INSTALL.md You can download and install ccache from: https://github.com/ccache/ccache/blob/master/doc/INSTALL.md You can download and install ccache from: https://github.com/ccache/ccache/blob/master/doc/INSTALL.md You can download and install ccache from: https://github.com/ccache/ccache/blob/master/doc/INSTALL.md You can download and install ccache from: https://github.com/ccache/ccache/blob/master/doc/INSTALL.md

    1.2K10编辑于 2025-04-25
  • 来自专栏TBOOX开源工程

    Xmake v2.6.6 发布,分布式编译和缓存支持

    因此,使用了 Xmake,就等于同时使用了 distcc/ccache/sccache。 $ xmake f --ccache=n 注:不管是否使用内置本地缓存,配置名都是 --ccache=,意思是 c/c++ 构建缓存,而不仅仅是指 ccache 工具的名字。 $ xmake f --ccache=n --cxx="ccache gcc" --cc="ccache gcc" $ xmake 远程编译缓存支持 除了本地缓存,我们也提供了远程缓存服务,类似 mozilla 以 Daemon 模式开启服务 $ xmake service --ccache --start $ xmake service --ccache --restart $ xmake service - 我们需要在连接时候,输入 --ccache,指定仅仅连接远程编译缓存服务。

    79330编辑于 2022-06-06
  • 来自专栏鸿蒙开发笔记

    如何让加快OpenHarmony编译速度

    /build.sh --product-name rk3568 --ccache通过在该命令后添加如下选项提升编译速度添加 --jobs 参数为编译添加多线程并发执行. /build.sh --product-name rk3568 --disable-package-image添加 --ccache 参数:ccache 会缓存 c/c++ 编译的编译输出,下一次在编译输入不变的情况下 用来缓存编译过的.o 文件等执行 sudo apt-get install ccache 命令安装 ccache再在 --ccache 后添加 export CCACHE_NOHASHDIR="true " 和 export CCACHE_SLOPPINESS="include_file_ctime" (设置 ccache 在做 hash 的时候不 hash 路径、不检查文件的 change time) /build.sh --product-name rk3568 --ccache export CCACHE_NOHASHDIR="true" export CCACHE_SLOPPINESS="include_file_ctime

    1.1K20编辑于 2024-07-31
  • 来自专栏TBOOX开源工程

    使用xmake构建c++20 modules

    ; return 0; } 接下来我们执行xmake来构建下这个程序吧: ruki:hello ruki$ xmake [ 0%]: ccache compiling.release src /hello.mpp [ 50%]: ccache compiling.release src/main.cpp [100%]: linking.release hello build ok! compiling.release src/hello.mpp /usr/local/bin/ccache /usr/bin/xcrun -sdk macosx clang -c -fmodules-ts /x86_64/release/src/hello.mpp.o build/.objs/hello/macosx/x86_64/release/src/hello.mpp.o.pcm [ 50%]: ccache compiling.release src/main.cpp /usr/local/bin/ccache /usr/bin/xcrun -sdk macosx clang -c -fmodules-ts

    2.1K40发布于 2019-09-24
  • 来自专栏NebulaGraph 技术文章

    用 GitHub Action 构建一套 CI/CD 系统

    目前使用最新版本的 ccache 来完成缓存的任务。 ccache ccache 是个编译器的缓存工具,可以有效地加速编译的过程,同时支持 gcc/clang 等编译器。 所以只要在容器环境中对 ccache 做些配置即可,比如在 ccache.conf 中配置其最大缓存容量为 1 G,超出后自动替换较旧缓存。 max_size = 1.0G ccache.conf 配置文件最好放置在缓存目录下,这样 ccache 可方便读取其中内容。 ,来减少 ccache 读写时间。

    1.4K50发布于 2020-05-08
  • 来自专栏安恒网络空间安全讲武堂

    通过SSH隧道传递票证

    以下是为用户创建ccache文件 . /ticketer.py -nthash NT哈希 -domain-sid DOMAIN-SID -domain DOMAIN.FQDN 要使Impacket示例脚本能够使用ccache文件进行身份验证 ,而不是提供明文密码或NT哈希,我们需要将KRB5CCNAME变量设置为ccache文件的绝对路径: export KRB5CCNAME=/path/to/ccache/file 验证变量设置是否正确 使用以下语法将kirbi文件转换为ccache文件: misc::convert ccache /path/to/ticket.kirbi 您可以使用以下语法转换多个kirbi票证: misc::convert 将ccache文件Kekeo输出复制到攻击Linux主机。确保在Linux主机上记下文件的绝对路径; 我们需要它来设置KRB5CCNAME变量。其余的攻击使用我们的Linux主机。

    1.5K30发布于 2019-09-17
  • 来自专栏编程从踩坑到跳坑

    简单几步!Windows下Clion结合docker调试openjdk8源码

    20160609 (at /usr/bin/g++-5) Build performance summary: * Cores to use: 4 * Memory limit: 12698 MB * ccache status: not installed (consider installing) Build performance tip: ccache gives a tremendous speedup You do not have ccache installed. Try installing it. You might be able to fix this by running 'sudo apt-get install ccache'. make all DISABLE_HOTSPOT_OS_VERSION_CHECK

    1.7K10发布于 2021-01-20
  • 来自专栏skyyws的技术专栏

    Docker部署hue,连接带kerberos认证的Impala集群

    may provide more information (No Kerberos credentials available (default cache: /home/hue/hue_krb5_ccache may provide more information (No Kerberos credentials available (default cache: /home/hue/hue_krb5_ccache kerberos retry attempt 0 from keytab /usr/bin/kinit -k -t /home/hue/impala.keytab -c /home/hue/hue_krb5_ccache Renewing kerberos ticket to work around kerberos 1.8.1: /usr/bin/kinit -R -c /home/hue/hue_krb5_ccache =/home/hue/hue_krb5_ccache kinit_path=/usr/bin/kinit [[database]] engine=mysql host=mysql_host

    2.2K20编辑于 2022-05-20
  • 来自专栏TBOOX开源工程

    xmake v2.6.2 发布,新增 Linux 内核驱动模块构建支持

    $ xmake [ 20%]: ccache compiling.release src/add.c [ 20%]: ccache compiling.release src/hello.c [ 60% compiling.release src/add.c [ 16%]: ccache compiling.release src/hello.c [ 16%]: ccache compiling.release $ xmake -v [ 20%]: ccache compiling.release src/add.c /usr/bin/ccache /usr/bin/gcc -c -m64 -O2 -std=gnu89 /usr/bin/ccache /usr/bin/gcc -c -m64 -O2 -std=gnu89 -I/usr/src/linux-headers-5.11.0-41-generic/arch/x86 compiling.release src/add.c [ 20%]: ccache compiling.release src/hello.c [ 60%]: linking.release build

    3K10编辑于 2021-12-24
  • 来自专栏会玩code

    【系列教程】 C++项目开发配置最佳实践(vscode远程开发配置、格式化、代码检查、cmake管理配置)

    ccache加速编译随着项目代码量越来越多,编译花费的时间会很长,在调试代码时,我们可能只改了一行代码,每次要编译个几分钟。这个时候就轮到ccache登场了。 ccache 的基本原理是通过将头文件高速缓存到源文件之中而改进了构建性能,因而通过减少每一步编译时添加头文件所需要的时间而提高了构建速度。 ccache安装yum install ccache结合cmake使用在根目录的CMakeLists.txt加上下面这段代码find_program(CCACHE_FOUND ccache)if(CCACHE_FOUND ) set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache) set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache) # Less useful to do it for linking, see edit2endif(CCACHE_FOUND)重新进行编译,会发现第一遍还是比较久,但之后的编译速度就会变的很快了

    5.5K30编辑于 2022-08-30
  • 来自专栏HyperAI超神经

    TVM 从入门到精通 | 安装 TVM (Part 1)

    - 某些支持平台上,Ccache 编译器 Wrapper 可帮助减少 TVM 的构建时间。在 TVM 构建中启用 CCache 的方法包括: 1. Ccache 的 Masquerade 模式。 通常在 Ccache 安装过程中启用。要让 TVM 在 masquerade 中使用 Ccache,只需在配置 TVM 的构建系统时指定适当的 C/C++ 编译器路径。 例如:cmake -DCMAKE_CXX_COMPILER=/usr/lib/ccache/c++ ... 2. Ccache 作为 CMake 的 C++ 编译器前缀。 例如:cmake -DCMAKE_CXX_COMPILER_LAUNCHER=ccache ... * 构建 TVM 及相关库: cd build cmake .. make -j4 - 可以使用

    4.9K30编辑于 2023-02-27
  • 来自专栏Bypass

    域渗透 | Kerberos攻击速查表

    :[password]# If not provided, password is asked# Set the TGT for impacket useexport KRB5CCNAME=<TGT_ccache_file \\<remote_hostname> cmd 0x05 Pass The Ticket (PTT) 从Linux中获得tickets 检查tickets的类型和位置: grep default_ccache_name 使用ticket_converter.py在Linux / Windows格式之间转换tickets: python ticket_converter.py ticket.kirbi ticket.ccache python ticket_converter.py ticket.ccache ticket.kirbi 在Linux中使用ticket: 使用Impacket示例: # Set the ticket for impacket useexport KRB5CCNAME=<TGT_ccache_file_path># Execute remote commands with any of the following

    2.1K20发布于 2020-01-02
  • 来自专栏鸿蒙开发笔记

    移植speexdsp到OpenHarmony标准系统④

    添加–ccache参数:原理:ccache会缓存c/c++编译的编译输出,下一次在编译输入不变的情况下,直接复用缓存的产物。 安装:快速安装:执行sudo apt-get install ccache命令。使用:执行./build.sh --product-name 产品名 --ccache命令。 /build.sh --product-name 产品名 --gn-args --enable_notice_collection=false --ccache命令。 /build.sh --product-name rk3568 --ccache --build-target=speexdsp --target-cpu arm64++++++++++++++++++ ++++++++++++++++++++++2022-09-07 22:03:47--product-name rk3568 --ccache --build-target=speexdsp --target-cpu

    53520编辑于 2024-09-09
  • 来自专栏鸿蒙开发笔记

    OpenHarmony开源鸿蒙build编译模块的原理和系统配置解析

    /build.py --product-name ohos-sdk $ccache_args $xcache_args --load-test-config=false --get-warning-list =false --stat-ccache=false --compute-overlap-rate=false --deps-guard=false --generate-ninja-trace=false =false" || "${@}" =~ "--ccache false" ]]; then ccache_args="--ccache=false" else ccache_args=" --ccache=true" fi if [[ "${@}" =~ "--xcache=true" || "${@}" =~ "--xcache true" || "${@}" =~ "--xcache /build.sh --product-name ohos-sdk --ccache使用方法:修改.json和.gn文件鸿蒙build编译子模块中有个顶层的bundle.json配置:{ "name"

    1.4K20编辑于 2024-10-13
  • 来自专栏爱打音游的大A

    Kali编译LineageOS-19.1 for 小米8se

    安装必要依赖   首先根据官网要求先安装一些必要的依赖,最好用kali自己的apt源,不然可能出错 sudo apt install bc bison build-essential ccache curl 开始编译 启用缓存加速(可选) export USE_CCACHE=1 export CCACHE_EXEC=/usr/bin/ccache ccache -M 50G ccache -o compression

    2.4K20编辑于 2023-02-14
领券