Skip to content

Commit

Permalink
Disable preprocessor cache when doing distributed compilation (#2173)
Browse files Browse the repository at this point in the history
  • Loading branch information
glandium authored May 21, 2024
1 parent 4dff5d6 commit 5f2b5c8
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions src/compiler/c.rs
Original file line number Diff line number Diff line change
Expand Up @@ -382,20 +382,22 @@ where
// Try to look for a cached preprocessing step for this compilation
// request.
let preprocessor_cache_mode_config = storage.preprocessor_cache_mode_config();
let mut preprocessor_key = if preprocessor_cache_mode_config.use_preprocessor_cache_mode {
preprocessor_cache_entry_hash_key(
&executable_digest,
parsed_args.language,
&preprocessor_and_arch_args,
&extra_hashes,
&env_vars,
&absolute_input_path,
compiler.plusplus(),
preprocessor_cache_mode_config,
)?
} else {
None
};
// Disable preprocessor cache when doing distributed compilation
let mut preprocessor_key =
if !may_dist && preprocessor_cache_mode_config.use_preprocessor_cache_mode {
preprocessor_cache_entry_hash_key(
&executable_digest,
parsed_args.language,
&preprocessor_and_arch_args,
&extra_hashes,
&env_vars,
&absolute_input_path,
compiler.plusplus(),
preprocessor_cache_mode_config,
)?
} else {
None
};
if let Some(preprocessor_key) = &preprocessor_key {
if cache_control == CacheControl::Default {
if let Some(mut seekable) =
Expand Down

0 comments on commit 5f2b5c8

Please sign in to comment.