diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-02-12 09:10:08 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-02-12 09:10:08 +0200 |
commit | 83ea171c180e0bc0ece8f4070489c1ee10a99e5e (patch) | |
tree | c51e3881fb20abd2cf4b680965feda3f3ff377af | |
parent | 78634fa442ca0931663b9307a366aae9e28c03a4 (diff) |
Use path::realize() instead of normalize() for extracted dependencies
-rw-r--r-- | build2/cxx/compile.cxx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/build2/cxx/compile.cxx b/build2/cxx/compile.cxx index db63700..e4f2e7b 100644 --- a/build2/cxx/compile.cxx +++ b/build2/cxx/compile.cxx @@ -536,10 +536,11 @@ namespace build2 } path f (move (fs)); - f.normalize (); if (!f.absolute ()) { + f.normalize (); + // This is probably as often an error as an auto-generated // file, so trace at level 4. // @@ -584,6 +585,13 @@ 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 (); + level6 ([&]{trace << "injecting " << f;}); // Split the name into its directory part, the name part, and |