summaryrefslogtreecommitdiff
path: root/src/buildtool/common/cli.hpp
diff options
context:
space:
mode:
authorKlaus Aehlig <klaus.aehlig@huawei.com>2022-07-01 16:30:54 +0200
committerKlaus Aehlig <klaus.aehlig@huawei.com>2022-07-05 17:25:03 +0200
commit5ad86a9dbae101cc31792c1ca970316f6e41c4b9 (patch)
tree4e4c7adbd5f1c1733998cfa4dd2fece04fe6726b /src/buildtool/common/cli.hpp
parent452b8664e40fd30a274393f4d97ccdedef8c4e15 (diff)
downloadjustbuild-5ad86a9dbae101cc31792c1ca970316f6e41c4b9.tar.gz
Implement staging of action inputs
Add an option to change the requested result to be (as artifacts) the input stage of a specified action. In this way, the inputs to individual actions can conveniently be inspected, e.g., for local debugging of why an action failed.
Diffstat (limited to 'src/buildtool/common/cli.hpp')
-rw-r--r--src/buildtool/common/cli.hpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/buildtool/common/cli.hpp b/src/buildtool/common/cli.hpp
index b2bd4576..4d5df1bf 100644
--- a/src/buildtool/common/cli.hpp
+++ b/src/buildtool/common/cli.hpp
@@ -35,6 +35,7 @@ struct AnalysisArguments {
std::string defines{};
std::filesystem::path config_file{};
std::optional<nlohmann::json> target{};
+ std::optional<std::string> request_action_input{};
std::optional<std::string> target_file_name{};
std::optional<std::string> rule_file_name{};
std::optional<std::string> expression_file_name{};
@@ -154,6 +155,11 @@ static inline auto SetupAnalysisArguments(
app->add_option(
"-c,--config", clargs->config_file, "Path to configuration file.")
->type_name("PATH");
+ app->add_option(
+ "--request-action-input",
+ clargs->request_action_input,
+ "Instead of the target result, request input for this action.")
+ ->type_name("ACTION");
app->add_option_function<std::vector<std::string>>(
"target",
[clargs](auto const& target_raw) {