aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-02-12 14:52:25 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-02-12 14:52:25 +0200
commit00ed965e4a29f66666d2bf4372d2d6919c29664e (patch)
tree7f59a7458279398ff725ed1e60b801466e2ced2c
parent840354da0c54a5036c68cc75eb069d19ac36d0e5 (diff)
Don't call realize() on non-existing header paths
-rw-r--r--build2/cxx/compile.cxx16
1 files changed, 9 insertions, 7 deletions
diff --git a/build2/cxx/compile.cxx b/build2/cxx/compile.cxx
index e4f2e7b..b924aa2 100644
--- a/build2/cxx/compile.cxx
+++ b/build2/cxx/compile.cxx
@@ -584,13 +584,15 @@ namespace build2
f = i->second / f;
}
-
- // We used to just normalize the path but that could result in
- // an invalid path (e.g., on CentOS 7 with Clang 3.4) because
- // of the symlinks. So now we realize (i.e., realpath(3)) it
- // instead.
- //
- f.realize ();
+ else
+ {
+ // We used to just normalize the path but that could result in
+ // an invalid path (e.g., on CentOS 7 with Clang 3.4) because
+ // of the symlinks. So now we realize (i.e., realpath(3)) it
+ // instead.
+ //
+ f.realize ();
+ }
level6 ([&]{trace << "injecting " << f;});