aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-08-04 12:03:30 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-08-04 12:03:30 +0200
commitde8e93420527598bbf2c96ef44f74e3856c65c3b (patch)
tree3908790bd90031b3e53d8be9589e6c2ccff7b539
parent091de5764d73f9c084827afa154a691d7d9ac75a (diff)
Check for preprocessed value on source, not output target
-rw-r--r--build2/cc/compile.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/build2/cc/compile.cxx b/build2/cc/compile.cxx
index 1db827d..491b9f5 100644
--- a/build2/cc/compile.cxx
+++ b/build2/cc/compile.cxx
@@ -802,7 +802,9 @@ namespace build2
// This determines which of the following steps we perform and on
// what source (original or preprocessed).
//
- if (const string* v = cast_null<string> (t[x_preprocessed]))
+ // Note: must be set of the src target.
+ //
+ if (const string* v = cast_null<string> (src[x_preprocessed]))
try
{
md.pp = to_preprocessed (*v);
@@ -810,7 +812,7 @@ namespace build2
catch (const invalid_argument& e)
{
fail << "invalid " << x_preprocessed.name << " variable value "
- << "for target " << t << ": " << e;
+ << "for target " << src << ": " << e;
}
// If we have no #include directives, then skip header dependency