aboutsummaryrefslogtreecommitdiff
path: root/libbuild2
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-02-11 14:20:50 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-02-11 14:20:50 +0200
commit7b7732096c0c4cb6f9f1c8e31a48417973748ff8 (patch)
tree9bdd62a4b137c6ab2a1aa2f2966dabbd715cf15e /libbuild2
parent5278e39d58007b730e452a14d8e13aa93118e9f4 (diff)
Instrument unassigned source path case in cc::compile_rule
Diffstat (limited to 'libbuild2')
-rw-r--r--libbuild2/cc/compile-rule.cxx13
1 files changed, 12 insertions, 1 deletions
diff --git a/libbuild2/cc/compile-rule.cxx b/libbuild2/cc/compile-rule.cxx
index b0fc40c..3b79b39 100644
--- a/libbuild2/cc/compile-rule.cxx
+++ b/libbuild2/cc/compile-rule.cxx
@@ -900,7 +900,18 @@ namespace build2
//
{
const path& p (src.path ());
- assert (!p.empty ()); // Sanity check.
+
+ // We seem to have a race condition here but can't quite put our
+ // finger on it.
+ //
+ // assert (!p.empty ()); // Sanity check.
+ if (p.empty ())
+ {
+ info << "unassigned path for target " << src <<
+ info << "target state: " << src.matched_state (a, false) <<
+ info << "is empty_path: " << (&p == &empty_path);
+ assert (false);
+ }
if (dd.expect (p) != nullptr)
l4 ([&]{trace << "source file mismatch forcing update of " << t;});