From b734b2a16678b835742eed0de5fbf07f8a6332ae Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Thu, 15 May 2025 11:57:38 +0200 Subject: just-mr: support invocation-specific artifacts-to-build logging It is already supported to ask just-mr (via the rc file) to log for each invocation the artifacts that were built. Add a similar option for the artifacts that were to be built, i.e., for dumping the intensional description of the output artifacts. That information can be used, e.g., to compute the critical path. --- src/other_tools/just_mr/launch.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/other_tools/just_mr/launch.cpp') diff --git a/src/other_tools/just_mr/launch.cpp b/src/other_tools/just_mr/launch.cpp index 7d2bdf25..0a061031 100644 --- a/src/other_tools/just_mr/launch.cpp +++ b/src/other_tools/just_mr/launch.cpp @@ -326,6 +326,20 @@ auto CallJust(std::optional const& config_file, cmd.emplace_back("--dump-plain-graph"); cmd.emplace_back(*log_dir / *invocation_log.graph_file_plain); } + if (invocation_log.dump_artifacts_to_build) { + if (not IsValidFileName(*invocation_log.dump_artifacts_to_build)) { + Logger::Log( + LogLevel::Error, + "Invalid file name for option --dump-artifacts_to_build: " + "{}", + nlohmann::json(*invocation_log.dump_artifacts_to_build) + .dump()); + std::exit(kExitClargsError); + } + cmd.emplace_back("--dump-artifacts-to-build"); + cmd.emplace_back(*log_dir / + *invocation_log.dump_artifacts_to_build); + } if (does_build and invocation_log.dump_artifacts) { if (not IsValidFileName(*invocation_log.dump_artifacts)) { Logger::Log( -- cgit v1.2.3