summaryrefslogtreecommitdiff
path: root/src/other_tools/just_mr/launch.cpp
diff options
context:
space:
mode:
authorKlaus Aehlig <klaus.aehlig@huawei.com>2025-02-25 16:54:03 +0100
committerKlaus Aehlig <klaus.aehlig@huawei.com>2025-03-10 16:28:59 +0100
commit16fc9bf6c065f8a6adeaf55e4b418edfb9de1f38 (patch)
treebe9ac34fa70a3d7f46889646fcbf85e39d9c4719 /src/other_tools/just_mr/launch.cpp
parent01c2c8c0a48f6e1c9dc3882220fd68e72f8204a6 (diff)
downloadjustbuild-16fc9bf6c065f8a6adeaf55e4b418edfb9de1f38.tar.gz
Support graph options in invocation logging
Diffstat (limited to 'src/other_tools/just_mr/launch.cpp')
-rw-r--r--src/other_tools/just_mr/launch.cpp25
1 files changed, 24 insertions, 1 deletions
diff --git a/src/other_tools/just_mr/launch.cpp b/src/other_tools/just_mr/launch.cpp
index 181fc003..1c08688e 100644
--- a/src/other_tools/just_mr/launch.cpp
+++ b/src/other_tools/just_mr/launch.cpp
@@ -295,7 +295,30 @@ auto CallJust(std::optional<std::filesystem::path> const& config_file,
nlohmann::json(dir.string()).dump());
}
}
-
+ // invocation-specific
+ if (log_dir and supports_remote_properties) {
+ if (invocation_log.graph_file) {
+ if (not IsValidFileName(*invocation_log.graph_file)) {
+ Logger::Log(LogLevel::Error,
+ "Invalid file name for option --dump-graph: {}",
+ nlohmann::json(*invocation_log.graph_file).dump());
+ std::exit(kExitClargsError);
+ }
+ cmd.emplace_back("--dump-graph");
+ cmd.emplace_back(*log_dir / *invocation_log.graph_file);
+ }
+ if (invocation_log.graph_file_plain) {
+ if (not IsValidFileName(*invocation_log.graph_file_plain)) {
+ Logger::Log(
+ LogLevel::Error,
+ "Invalid file name for option --dump-plain-graph: {}",
+ nlohmann::json(*invocation_log.graph_file_plain).dump());
+ std::exit(kExitClargsError);
+ }
+ cmd.emplace_back("--dump-plain-graph");
+ cmd.emplace_back(*log_dir / *invocation_log.graph_file_plain);
+ }
+ }
// add (remaining) args given by user as clargs
for (auto it = just_cmd_args.additional_just_args.begin() +
additional_args_offset;