diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2019-03-12 14:08:11 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2019-03-12 14:08:11 +0200 |
commit | abf8895cc8611c23bda243e027360d7f91d47cc5 (patch) | |
tree | 6060c74193604e41a7fc009587a169a0f6db3634 | |
parent | b82ba002326f1c541876acc7efec650bac7f6403 (diff) |
Tweak resolution of relative targets from export.libs
-rw-r--r-- | build2/cc/common.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/build2/cc/common.cxx b/build2/cc/common.cxx index 5ccb198..7844a4e 100644 --- a/build2/cc/common.cxx +++ b/build2/cc/common.cxx @@ -417,9 +417,13 @@ namespace build2 chain->pop_back (); } - // The name can be an absolute target name (e.g., /tmp/libfoo/lib{foo}) or - // a potentially project-qualified relative target name (e.g., - // libfoo%lib{foo}). + // The name can be an absolute or relative target name (for example, + // /tmp/libfoo/lib{foo} or ../libfoo/lib{foo}) or a project-qualified + // relative target name (e.g., libfoo%lib{foo}). + // + // Note that in case of the relative target that comes from export.libs, + // the resolution happens relative to the base scope of the target from + // which this export.libs came, which is exactly what we want. // // Note that the scope, search paths, and the link order should all be // derived from the library target that mentioned this name. This way we @@ -439,7 +443,7 @@ namespace build2 const target* xt (nullptr); - if (n.dir.absolute () && !n.qualified ()) + if (!n.qualified ()) { // Search for an existing target with this name "as if" it was a // prerequisite. |