From bbd0f3bb21442a2833916110cbe8e9a07e9f4c1f Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 31 Jul 2015 12:52:20 +0200 Subject: Essential install module functionality --- build/cxx/compile.cxx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'build/cxx/compile.cxx') 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; } } -- cgit v1.1