aboutsummaryrefslogtreecommitdiff
path: root/build/parser.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'build/parser.cxx')
-rw-r--r--build/parser.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/build/parser.cxx b/build/parser.cxx
index e238628..1893b70 100644
--- a/build/parser.cxx
+++ b/build/parser.cxx
@@ -885,7 +885,11 @@ namespace build
static target*
derived_factory (const target_type& t, dir_path d, string n, const string* e)
{
- target* r (t.base->factory (*t.base, move (d), move (n), e));
+ // Pass our type to the base factory so that it can detect that it is
+ // being called to construct a derived target. This can be used, for
+ // example, to decide whether to "link up" to the group.
+ //
+ target* r (t.base->factory (t, move (d), move (n), e));
r->derived_type = &t;
return r;
}