diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2025-02-26 10:16:30 +0100 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2025-03-10 16:28:59 +0100 |
commit | d53358c350898091d9cf2ba76ccdfa9e590275ee (patch) | |
tree | 46f7e89bbc18dd3df3039a08a757c3b622d7cb1c /src/buildtool/main/main.cpp | |
parent | d1cfcdcb8909f35cdd1591dda099a5370648bbba (diff) | |
download | justbuild-d53358c350898091d9cf2ba76ccdfa9e590275ee.tar.gz |
Make graph-dumping options cummulative
If --dump-graph or --dump-plain-graph is given several times, the
action graph wil also be written several times. In this way, regular
use of those options will not be affected by adding them implicitly
through invocation-logging options in the rc file.
Diffstat (limited to 'src/buildtool/main/main.cpp')
-rw-r--r-- | src/buildtool/main/main.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/buildtool/main/main.cpp b/src/buildtool/main/main.cpp index e4ac6a02..b8579b55 100644 --- a/src/buildtool/main/main.cpp +++ b/src/buildtool/main/main.cpp @@ -1150,14 +1150,10 @@ auto main(int argc, char* argv[]) -> int { not_eligible); } - if (arguments.analysis.graph_file) { - analyse_result->result_map.ToFile( - *arguments.analysis.graph_file, &stats, &progress); - } - if (arguments.analysis.graph_file_plain) { - analyse_result->result_map.ToFile</*kIncludeOrigins=*/false>( - *arguments.analysis.graph_file_plain, &stats, &progress); - } + analyse_result->result_map.ToFile( + arguments.analysis.graph_file, &stats, &progress); + analyse_result->result_map.ToFile</*kIncludeOrigins=*/false>( + arguments.analysis.graph_file_plain, &stats, &progress); auto const [artifacts, runfiles] = ReadOutputArtifacts(analyse_result->target); if (arguments.analysis.artifacts_to_build_file) { |