aboutsummaryrefslogtreecommitdiff
path: root/build/cxx/compile.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-07-31 12:52:20 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-07-31 12:52:20 +0200
commitbbd0f3bb21442a2833916110cbe8e9a07e9f4c1f (patch)
treed25de6f2bcfa4b6cabe1fd55a1b8f508005de4c1 /build/cxx/compile.cxx
parent729b56300c441a0d63c7d2013eb5a881211d352b (diff)
Essential install module functionality
Diffstat (limited to 'build/cxx/compile.cxx')
-rw-r--r--build/cxx/compile.cxx12
1 files changed, 8 insertions, 4 deletions
diff --git a/build/cxx/compile.cxx b/build/cxx/compile.cxx
index ae1ebe2..d89aaac 100644
--- a/build/cxx/compile.cxx
+++ b/build/cxx/compile.cxx
@@ -649,12 +649,14 @@ namespace build
// There would normally be a lot of headers for every source
// file (think all the system headers) and this can get
// expensive. At the same time, most of these headers are
- // existing files that we will never be updating (again,
+ // existing files that we will never be updated (again,
// system headers, for example) and the rule that will match
- // them is fallback file_rule. So we are going to do a little
- // fast-path optimization by detecting this common case.
+ // them is fallback file_rule. That rule has an optimization
+ // in that it returns noop_recipe (which causes the target
+ // state to be automatically set to unchanged) if the file
+ // is known to be up to date.
//
- if (!file_rule::uptodate (a, pt))
+ if (pt.state () != target_state::unchanged)
{
// We only want to restart if our call to execute() actually
// caused an update. In particular, the target could already
@@ -787,5 +789,7 @@ namespace build
throw failed ();
}
}
+
+ compile compile::instance;
}
}