aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/cc/common.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2021-08-05 12:02:34 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2021-08-05 12:02:34 +0200
commit3f10e86873306e443159d3b8296eb024461e5c2f (patch)
tree7cc42bf8b781e3b4c762b8aad6bfe19b5d18dd80 /libbuild2/cc/common.hxx
parent2d382487e63c742becdc1adb37b12818976926b8 (diff)
Add resolved library cache, use in cc::process_libraries()
Diffstat (limited to 'libbuild2/cc/common.hxx')
-rw-r--r--libbuild2/cc/common.hxx14
1 files changed, 13 insertions, 1 deletions
diff --git a/libbuild2/cc/common.hxx b/libbuild2/cc/common.hxx
index 176c30e..a62b91b 100644
--- a/libbuild2/cc/common.hxx
+++ b/libbuild2/cc/common.hxx
@@ -272,6 +272,16 @@ namespace build2
// Library handling.
//
public:
+ struct library_cache_entry
+ {
+ optional<lorder> lo;
+ string type; // name::type
+ string value; // name::value
+ reference_wrapper<const mtime_target> lib;
+ };
+
+ using library_cache = small_vector<library_cache_entry, 32>;
+
void
process_libraries (
action,
@@ -287,6 +297,7 @@ namespace build2
lflags, bool)>&,
const function<void (const target&, const string&, bool, bool)>&,
bool = false,
+ library_cache* = nullptr,
small_vector<const target*, 16>* = nullptr) const;
const target*
@@ -321,7 +332,8 @@ namespace build2
const dir_path&,
optional<linfo>,
const dir_paths&,
- optional<dir_paths>&) const;
+ optional<dir_paths>&,
+ library_cache* = nullptr) const;
template <typename T>
static ulock