diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2025-01-28 16:09:26 +0100 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2025-01-28 17:01:29 +0100 |
commit | da749a585ab920d10f6379ebc465221732d23610 (patch) | |
tree | 2702bd634e637d7dacac2b2bb1f52ba168e381ea /src/buildtool/progress_reporting/progress.hpp | |
parent | 1a048ada5b52c28168242d697bd973532ae62f85 (diff) | |
download | justbuild-da749a585ab920d10f6379ebc465221732d23610.tar.gz |
Progress reporting: also report the primary action output
While reporting an origin target with action number within that
target describes an action uniquely in a way meaningful to the
user, it might not always be eay to unserstand which precise action
is currently running. For example, for a library with many source
files, we have a target generating a large number of actions and
the association of source file to action number requires detailled
knowledge of the build description. The name of the primary ouput
of that action, on the other hand immediately identifies the file
that is compiled. Therefore, report this as well.
Diffstat (limited to 'src/buildtool/progress_reporting/progress.hpp')
-rw-r--r-- | src/buildtool/progress_reporting/progress.hpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/buildtool/progress_reporting/progress.hpp b/src/buildtool/progress_reporting/progress.hpp index d3ca54dd..5c6573b2 100644 --- a/src/buildtool/progress_reporting/progress.hpp +++ b/src/buildtool/progress_reporting/progress.hpp @@ -41,6 +41,13 @@ class Progress { return origin_map_; } + // Return a reference to the output map. It is the responsibility of the + // caller to ensure that access only happens in a single-threaded context. + [[nodiscard]] auto OutputMap() noexcept + -> std::unordered_map<std::string, std::string>& { + return output_map_; + } + private: ::TaskTracker task_tracker_{}; std::unordered_map< @@ -48,6 +55,7 @@ class Progress { std::vector< std::pair<BuildMaps::Target::ConfiguredTarget, std::size_t>>> origin_map_; + std::unordered_map<std::string, std::string> output_map_; }; #endif // INCLUDED_SRC_BUILDTOOL_PROGRESS_REPORTING_PROGRESS_HPP |