From bcfcc38538af8bb896551c9e5730767807ad7a67 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 7 Feb 2017 10:05:47 +0200 Subject: Tighten code that operates during both search/match and execute --- build2/target.cxx | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'build2/target.cxx') 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> te ( tt.factory ( tt, move (dir), move (out), move (name), move (tk.ext))); -- cgit v1.1