diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2022-11-07 09:00:00 +0100 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2022-11-11 15:28:36 +0100 |
commit | bbd3319a00e91bd50fcabeb99e6096a349f692ca (patch) | |
tree | c9be59eb9a81b0ca331ea241539e92437e478f32 /src/buildtool/common/cli.hpp | |
parent | 78c51ae888d8e7bf6a0c77d905179b30eaf54d8c (diff) | |
download | justbuild-bbd3319a00e91bd50fcabeb99e6096a349f692ca.tar.gz |
Support dumping variables of the analysed target
Add an option --dump-vars showing the variables of the configuration
used (including the use of them being unset). This information can
be used, e.g., to export a given target in a maximally flexible way.
Diffstat (limited to 'src/buildtool/common/cli.hpp')
-rw-r--r-- | src/buildtool/common/cli.hpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/buildtool/common/cli.hpp b/src/buildtool/common/cli.hpp index 593d0a7c..f7ed66db 100644 --- a/src/buildtool/common/cli.hpp +++ b/src/buildtool/common/cli.hpp @@ -75,6 +75,7 @@ struct DiagnosticArguments { std::optional<std::string> dump_actions{std::nullopt}; std::optional<std::string> dump_blobs{std::nullopt}; std::optional<std::string> dump_trees{std::nullopt}; + std::optional<std::string> dump_vars{std::nullopt}; std::optional<std::string> dump_targets{std::nullopt}; std::optional<std::string> dump_targets_graph{std::nullopt}; std::optional<std::string> dump_anonymous{std::nullopt}; @@ -267,6 +268,11 @@ static inline auto SetupDiagnosticArguments( clargs->dump_blobs, "Dump blobs to file (use - for stdout).") ->type_name("PATH"); + app->add_option("--dump-vars", + clargs->dump_vars, + "Dump domain of the effective configuraiton to file (use - " + "for stdout).") + ->type_name("PATH"); app->add_option("--dump-targets", clargs->dump_targets, "Dump targets to file (use - for stdout).") |