aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-06-13 11:41:31 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-06-13 11:41:31 +0200
commitb93b736b034bfec6caf0d100145798ff112f3906 (patch)
tree0c12c7fc44a12e6034b4b5e665b0e2610108de94
parent18c95eef7ba0acf85b0e962b2642e1242742657a (diff)
Open depdb earlier to detect and diagnose missing output directory
-rw-r--r--build2/cc/link-rule.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/build2/cc/link-rule.cxx b/build2/cc/link-rule.cxx
index e3516ac..aed0ac2 100644
--- a/build2/cc/link-rule.cxx
+++ b/build2/cc/link-rule.cxx
@@ -1346,6 +1346,11 @@ namespace build2
timestamp mt (t.load_mtime ());
target_state ts (straight_execute_prerequisites (a, t));
+ // Open the dependency database (do it before messing with Windows
+ // manifests to diagnose missing output directory).
+ //
+ depdb dd (tp + ".d");
+
// If targeting Windows, take care of the manifest.
//
path manifest; // Manifest itself (msvc) or compiled object file.
@@ -1455,8 +1460,6 @@ namespace build2
// Check/update the dependency database.
//
- depdb dd (tp + ".d");
-
// First should come the rule name/version.
//
if (dd.expect (rule_id) != nullptr)