aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/scope.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-11-12 09:27:20 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-11-12 09:27:20 +0200
commitfb3a7f3343f9ee0cfd15b540a3209e438f6063eb (patch)
treeb60012bdf95e649dfc73c03a08b1a6cd9d28c12f /libbuild2/scope.cxx
parentcd10a583ad1f3c299383c07fd8c6ccd6e3199e6b (diff)
Assign fixed extensions to wasm{} and pdb{} target types
Diffstat (limited to 'libbuild2/scope.cxx')
-rw-r--r--libbuild2/scope.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/libbuild2/scope.cxx b/libbuild2/scope.cxx
index f8fc634..53c859f 100644
--- a/libbuild2/scope.cxx
+++ b/libbuild2/scope.cxx
@@ -929,6 +929,15 @@ namespace build2
return root_extra->target_types.insert (name, move (dt));
}
+ const target_type& scope::
+ derive_target_type (const target_type& et)
+ {
+ assert (root_scope () == this);
+ unique_ptr<target_type> dt (new target_type (et));
+ dt->factory = &derived_tt_factory;
+ return root_extra->target_types.insert (et.name, move (dt)).first;
+ }
+
// scope_map
//