From b93b736b034bfec6caf0d100145798ff112f3906 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 13 Jun 2018 11:41:31 +0200 Subject: Open depdb earlier to detect and diagnose missing output directory --- build2/cc/link-rule.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'build2/cc/link-rule.cxx') 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) -- cgit v1.1