aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/cc/link-rule.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2024-06-05 06:04:53 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2024-06-05 06:04:53 +0200
commitebd7afc12d9a3852c48b9468b050c6c7313e4b7f (patch)
tree8cfa14ac9424d53cb8545bc1888406414c5ea8d5 /libbuild2/cc/link-rule.cxx
parent630cf606c109a7650675c052c99034b77cf4e18d (diff)
Include top-level libraries in -rpath duplicate suppression logic
Diffstat (limited to 'libbuild2/cc/link-rule.cxx')
-rw-r--r--libbuild2/cc/link-rule.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/libbuild2/cc/link-rule.cxx b/libbuild2/cc/link-rule.cxx
index 08a60b9..9b0fbfd 100644
--- a/libbuild2/cc/link-rule.cxx
+++ b/libbuild2/cc/link-rule.cxx
@@ -2660,7 +2660,9 @@ namespace build2
if ((c
? f.compare (p, string::npos, e)
: icasecmp (f.c_str () + p, e)) == 0)
+ {
append (f);
+ }
}
}
@@ -2671,6 +2673,11 @@ namespace build2
{
// Top-level shared library dependency.
//
+ // As above, suppress duplicates.
+ //
+ if (find (d.ls.begin (), d.ls.end (), &l) != d.ls.end ())
+ return;
+
if (!l.path ().empty ()) // Not binless.
{
// It is either matched or imported so should be a cc library.