【问题标题】:ccache with same code base and multiple toolchains具有相同代码库和多个工具链的 ccache
【发布时间】:2014-02-24 16:14:14
【问题描述】:

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

想要在这种情况下命中,因为我希望使用 diab 重新编译文件。

【问题讨论】:

    标签: gcc icc ccache


    【解决方案1】:

    您不会在不同的编译器之间获得 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)
    

    【讨论】:

      猜你喜欢
      • 2014-10-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-06-19
      • 2015-09-03
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多