aboutsummaryrefslogtreecommitdiff
path: root/build2/target.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-02-07 10:05:47 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-02-13 12:42:42 +0200
commitbcfcc38538af8bb896551c9e5730767807ad7a67 (patch)
tree722e71364bf6d8080ca61d8b2d02879520d90765 /build2/target.cxx
parent7b9eb752cad04aaadc4552d0f26d307b04af1869 (diff)
Tighten code that operates during both search/match and execute
Diffstat (limited to 'build2/target.cxx')
-rw-r--r--build2/target.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/build2/target.cxx b/build2/target.cxx
index c032028..ad448cb 100644
--- a/build2/target.cxx
+++ b/build2/target.cxx
@@ -304,6 +304,11 @@ namespace build2
if (t == nullptr)
{
+ // We sometimes call insert() even if we expect to find an existing
+ // target in order to keep the same code (see cc/search_library()).
+ //
+ assert (phase != run_phase::execute);
+
pair<target*, optional<string>> te (
tt.factory (
tt, move (dir), move (out), move (name), move (tk.ext)));