gpt4 book ai didi

gcc - 具有相同代码库和多个工具链的 ccache

转载 作者:行者123 更新时间:2023-12-04 14:45:19 25 4
gpt4 key购买 nike

我们的系统支持使用三种不同的工具链(gcc、icc、diab)构建。我不确定在这种情况下使用 ccache 是否安全。我担心的是:如果我用 gcc 构建,然后用 diab 重建,如果文件和它们的依赖项相同,我会得到 ccache 命中吗?

在这种情况下,我不想受到打击,因为我希望使用 diab 重新编译文件。

最佳答案

您不会在不同编译器之间获得 ccache 命中。编译器是散列的。此外,您可以更改环境变量 CCACHE_COMPILERCHECK 以使用不同的方式检查编译器。
如在 ccache manual 中发现的:

For both modes, the following information is included in the hash:

the extension used by the compiler for a file with preprocessor output (normally .i for C code and .ii for C++ code)

the compiler’s size and modification time (or other compiler-specific information specified by CCACHE_COMPILERCHECK)

the name of the compiler

the current directory (if CCACHE_HASHDIR is set)

contents of files specified by CCACHE_EXTRAFILES (if any)

关于gcc - 具有相同代码库和多个工具链的 ccache,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21992983/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com