From bbd3319a00e91bd50fcabeb99e6096a349f692ca Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Mon, 7 Nov 2022 09:00:00 +0100 Subject: 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. --- src/buildtool/common/cli.hpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/buildtool/common/cli.hpp') 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 dump_actions{std::nullopt}; std::optional dump_blobs{std::nullopt}; std::optional dump_trees{std::nullopt}; + std::optional dump_vars{std::nullopt}; std::optional dump_targets{std::nullopt}; std::optional dump_targets_graph{std::nullopt}; std::optional 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).") -- cgit v1.2.3