@@ -935,6 +935,7 @@ define_config! {
935
935
optimized_compiler_builtins: Option <bool > = "optimized-compiler-builtins" ,
936
936
jobs: Option <u32 > = "jobs" ,
937
937
compiletest_diff_tool: Option <String > = "compiletest-diff-tool" ,
938
+ ccache: Option <StringOrBool > = "ccache" ,
938
939
}
939
940
}
940
941
@@ -1622,6 +1623,7 @@ impl Config {
1622
1623
optimized_compiler_builtins,
1623
1624
jobs,
1624
1625
compiletest_diff_tool,
1626
+ mut ccache,
1625
1627
} = toml. build . unwrap_or_default ( ) ;
1626
1628
1627
1629
config. jobs = Some ( threads_from_config ( flags. jobs . unwrap_or ( jobs. unwrap_or ( 0 ) ) ) ) ;
@@ -1928,14 +1930,11 @@ impl Config {
1928
1930
config. rustc_default_linker = default_linker;
1929
1931
config. musl_root = musl_root. map ( PathBuf :: from) ;
1930
1932
config. save_toolstates = save_toolstates. map ( PathBuf :: from) ;
1931
- set (
1932
- & mut config. deny_warnings ,
1933
- match flags. warnings {
1934
- Warnings :: Deny => Some ( true ) ,
1935
- Warnings :: Warn => Some ( false ) ,
1936
- Warnings :: Default => deny_warnings,
1937
- } ,
1938
- ) ;
1933
+ set ( & mut config. deny_warnings , match flags. warnings {
1934
+ Warnings :: Deny => Some ( true ) ,
1935
+ Warnings :: Warn => Some ( false ) ,
1936
+ Warnings :: Default => deny_warnings,
1937
+ } ) ;
1939
1938
set ( & mut config. backtrace_on_ice , backtrace_on_ice) ;
1940
1939
set ( & mut config. rust_verify_llvm_ir , verify_llvm_ir) ;
1941
1940
config. rust_thin_lto_import_instr_limit = thin_lto_import_instr_limit;
@@ -2006,7 +2005,7 @@ impl Config {
2006
2005
tests,
2007
2006
enzyme,
2008
2007
plugins,
2009
- ccache,
2008
+ ccache : llvm_ccache ,
2010
2009
static_libstdcpp,
2011
2010
libzstd,
2012
2011
ninja,
@@ -2029,13 +2028,7 @@ impl Config {
2029
2028
download_ci_llvm,
2030
2029
build_config,
2031
2030
} = llvm;
2032
- match ccache {
2033
- Some ( StringOrBool :: String ( ref s) ) => config. ccache = Some ( s. to_string ( ) ) ,
2034
- Some ( StringOrBool :: Bool ( true ) ) => {
2035
- config. ccache = Some ( "ccache" . to_string ( ) ) ;
2036
- }
2037
- Some ( StringOrBool :: Bool ( false ) ) | None => { }
2038
- }
2031
+ ccache = ccache. or ( llvm_ccache) ;
2039
2032
set ( & mut config. ninja_in_file , ninja) ;
2040
2033
llvm_tests = tests;
2041
2034
llvm_enzyme = enzyme;
@@ -2189,6 +2182,14 @@ impl Config {
2189
2182
}
2190
2183
}
2191
2184
2185
+ match ccache {
2186
+ Some ( StringOrBool :: String ( ref s) ) => config. ccache = Some ( s. to_string ( ) ) ,
2187
+ Some ( StringOrBool :: Bool ( true ) ) => {
2188
+ config. ccache = Some ( "ccache" . to_string ( ) ) ;
2189
+ }
2190
+ Some ( StringOrBool :: Bool ( false ) ) | None => { }
2191
+ }
2192
+
2192
2193
if config. llvm_from_ci {
2193
2194
let triple = & config. build . triple ;
2194
2195
let ci_llvm_bin = config. ci_llvm_root ( ) . join ( "bin" ) ;
0 commit comments