2014-02-24 56 views
3

我們的系統支持使用三種不同的工具鏈(gcc,icc,diab)構建。我不確定在這種情況下使用ccache是​​否安全。我的關注點如下:如果我使用gcc構建,然後使用diab重建,那麼在文件和它們的依賴關係相同的情況下,我會得到ccache命中嗎?具有相同代碼庫和多個工具鏈的ccache

不要想在這種情況下命中,因爲我想文件重新編譯與迪亞布。

回答

4

你不會在不同的編譯器之間獲得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) 
相關問題