diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2025-02-28 09:26:16 +0100 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2025-03-10 16:28:59 +0100 |
commit | be1e3354a3479a6ad4d265122fe4fa20bcbf9787 (patch) | |
tree | 3850b015a8802ac60c2b23fa01dbb3521da0a2bb /src/buildtool/common/cli.hpp | |
parent | 16fc9bf6c065f8a6adeaf55e4b418edfb9de1f38 (diff) | |
download | justbuild-be1e3354a3479a6ad4d265122fe4fa20bcbf9787.tar.gz |
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.
Diffstat (limited to 'src/buildtool/common/cli.hpp')
-rw-r--r-- | src/buildtool/common/cli.hpp | 4 |
1 files changed, 4 insertions, 0 deletions
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<std::filesystem::path> graph_file_plain; std::optional<std::filesystem::path> artifacts_to_build_file; std::optional<std::filesystem::path> serve_errors_file; + std::optional<std::string> 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<std::string>( "--dump-graph", |