From ca9b1fa2328cfa7f511c30191146147f0726a1a5 Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Fri, 25 Apr 2025 12:03:41 +0200 Subject: just-mr: support invocation-specifing artifact dumping --- src/other_tools/just_mr/launch.cpp | 11 +++++++++++ 1 file changed, 11 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 cb0f70d2..7d71da9a 100644 --- a/src/other_tools/just_mr/launch.cpp +++ b/src/other_tools/just_mr/launch.cpp @@ -324,6 +324,17 @@ 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) { + if (not IsValidFileName(*invocation_log.dump_artifacts)) { + Logger::Log( + LogLevel::Error, + "Invalid file name for option --dump-artifacts: {}", + nlohmann::json(*invocation_log.dump_artifacts).dump()); + std::exit(kExitClargsError); + } + cmd.emplace_back("--dump-artifacts"); + cmd.emplace_back(*log_dir / *invocation_log.dump_artifacts); + } if (invocation_log.profile) { if (not IsValidFileName(*invocation_log.profile)) { Logger::Log(LogLevel::Error, -- cgit v1.2.3