aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/target.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2022-04-18 13:49:16 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2022-04-19 04:12:34 +0200
commit77fc9816696ebed3cc8685a8fdee464799f2a157 (patch)
tree936a3379bcc91593f1a96ba5958ab64f841f43ec /libbuild2/target.cxx
parent095583f1fbab20937720f9311ddb9945ff2b9224 (diff)
Skip find() inside target_set::insert*() if target is unlikely to be there
Diffstat (limited to 'libbuild2/target.cxx')
-rw-r--r--libbuild2/target.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/libbuild2/target.cxx b/libbuild2/target.cxx
index 7eaa3a6..4f11b54 100644
--- a/libbuild2/target.cxx
+++ b/libbuild2/target.cxx
@@ -698,10 +698,11 @@ namespace build2
optional<string> ext,
target_decl decl,
tracer& trace,
+ bool skip_find,
bool need_lock)
{
target_key tk {&tt, &dir, &out, &name, move (ext)};
- target* t (const_cast<target*> (find (tk, trace)));
+ target* t (skip_find ? nullptr : const_cast<target*> (find (tk, trace)));
if (t == nullptr)
{