diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/other_tools/just_mr/cli.hpp | 1 | ||||
-rw-r--r-- | src/other_tools/just_mr/launch.cpp | 14 | ||||
-rw-r--r-- | src/other_tools/just_mr/rc.cpp | 6 |
3 files changed, 21 insertions, 0 deletions
diff --git a/src/other_tools/just_mr/cli.hpp b/src/other_tools/just_mr/cli.hpp index df952957..defb7be6 100644 --- a/src/other_tools/just_mr/cli.hpp +++ b/src/other_tools/just_mr/cli.hpp @@ -98,6 +98,7 @@ struct InvocationLogArguments { std::optional<std::string> metadata{std::nullopt}; std::optional<std::string> graph_file{std::nullopt}; std::optional<std::string> graph_file_plain{std::nullopt}; + std::optional<std::string> dump_artifacts_to_build{std::nullopt}; std::optional<std::string> dump_artifacts{std::nullopt}; std::optional<std::string> profile{std::nullopt}; }; 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<std::filesystem::path> 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( diff --git a/src/other_tools/just_mr/rc.cpp b/src/other_tools/just_mr/rc.cpp index 7d7f6f5a..41b7e77e 100644 --- a/src/other_tools/just_mr/rc.cpp +++ b/src/other_tools/just_mr/rc.cpp @@ -619,6 +619,12 @@ namespace { if (graph_file_plain->IsString()) { clargs->invocation_log.graph_file = graph_file_plain->String(); } + auto dump_artifacts_to_build = invocation_log->Get( + "--dump-artifacts-to-build", Expression::none_t{}); + if (dump_artifacts_to_build->IsString()) { + clargs->invocation_log.dump_artifacts_to_build = + dump_artifacts_to_build->String(); + } auto dump_artifacts = invocation_log->Get("--dump-artifacts", Expression::none_t{}); if (dump_artifacts->IsString()) { |