From be1e3354a3479a6ad4d265122fe4fa20bcbf9787 Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Fri, 28 Feb 2025 09:26:16 +0100 Subject: Add basic --profile option to just ... so far only keeping track basic properties of the invocation. Still, the code is already organized to support future extensions; in particular, we do not have to rely on the Profile class being copyable. --- src/buildtool/common/cli.hpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/buildtool/common/cli.hpp') diff --git a/src/buildtool/common/cli.hpp b/src/buildtool/common/cli.hpp index a8acea87..26b284d9 100644 --- a/src/buildtool/common/cli.hpp +++ b/src/buildtool/common/cli.hpp @@ -77,6 +77,7 @@ struct AnalysisArguments { std::vector graph_file_plain; std::optional artifacts_to_build_file; std::optional serve_errors_file; + std::optional profile; }; /// \brief Arguments required for describing targets/rules. @@ -345,6 +346,9 @@ static inline auto SetupAnalysisArguments( "File path for dumping the blob identifiers of serve " "errors as json.") ->type_name("PATH"); + app->add_option( + "--profile", clargs->profile, "Location to write the profile to.") + ->type_name("PATH"); if (with_graph) { app->add_option_function( "--dump-graph", -- cgit v1.2.3