return;
}
- auto old_st = Stat::stat(manifest_path);
+ auto old_st = Stat::stat(ctx.manifest_path);
// See comment in get_file_hash_index for why saving of timestamps is forced
// for precompiled headers.
|| ctx.args_info.output_is_precompiled_header;
MTR_BEGIN("manifest", "manifest_put");
- cc_log("Adding result name to %s", manifest_path);
+ cc_log("Adding result name to %s", ctx.manifest_path.c_str());
if (!manifest_put(ctx.config,
- manifest_path,
+ ctx.manifest_path,
*ctx.result_name,
g_included_files,
save_timestamp)) {
- cc_log("Failed to add result name to %s", manifest_path);
+ cc_log("Failed to add result name to %s", ctx.manifest_path.c_str());
} else {
- auto st = Stat::stat(manifest_path, Stat::OnError::log);
+ auto st = Stat::stat(ctx.manifest_path, Stat::OnError::log);
stats_update_size(ctx,
from_cstr(manifest_stats_file),
st.size_on_disk() - old_st.size_on_disk(),
char manifest_name_string[DIGEST_STRING_BUFFER_SIZE];
hash_result_as_string(hash, manifest_name_string);
- manifest_path =
- x_strdup(Util::get_path_in_cache(ctx.config.cache_dir(),
- ctx.config.cache_dir_levels(),
- manifest_name_string,
- ".manifest")
- .c_str());
+ ctx.manifest_path = Util::get_path_in_cache(ctx.config.cache_dir(),
+ ctx.config.cache_dir_levels(),
+ manifest_name_string,
+ ".manifest");
manifest_stats_file = format(
"%s/%c/stats", ctx.config.cache_dir().c_str(), manifest_name_string[0]);
- cc_log("Looking for result name in %s", manifest_path);
+ cc_log("Looking for result name in %s", ctx.manifest_path.c_str());
MTR_BEGIN("manifest", "manifest_get");
- result_name = manifest_get(ctx, manifest_path);
+ result_name = manifest_get(ctx, ctx.manifest_path);
MTR_END("manifest", "manifest_get");
if (result_name) {
cc_log("Got result name from manifest");
cc_reset()
{
free_and_nullify(included_pch_file);
- free_and_nullify(manifest_path);
time_of_compilation = 0;
for (size_t i = 0; i < ignore_headers_len; i++) {
free_and_nullify(ignore_headers[i]);
cc_log("Hash from manifest doesn't match preprocessor output");
cc_log("Likely reason: different CCACHE_BASEDIRs used");
cc_log("Removing manifest as a safety measure");
- x_unlink(manifest_path);
+ x_unlink(ctx.manifest_path.c_str());
put_result_in_manifest = true;
}