aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/cc
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2024-06-07 08:08:36 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2024-06-07 08:08:36 +0200
commit63bd5b82459036c647a521efb2c8668ceb520ec5 (patch)
treeeea34c190ace749955dcbe033b03e06fd0a9b5b3 /libbuild2/cc
parentadc86e88e4628778731d8c76e53454d3ad47eeb7 (diff)
Use combined -L option form for extra system search paths
The split one was just too much of an eye-sore in the logs.
Diffstat (limited to 'libbuild2/cc')
-rw-r--r--libbuild2/cc/link-rule.cxx14
1 files changed, 10 insertions, 4 deletions
diff --git a/libbuild2/cc/link-rule.cxx b/libbuild2/cc/link-rule.cxx
index 6b0c337..417cba5 100644
--- a/libbuild2/cc/link-rule.cxx
+++ b/libbuild2/cc/link-rule.cxx
@@ -3479,13 +3479,19 @@ namespace build2
append_args (sargs1);
}
- else
+ else if (b != x)
{
- append_option_values (
- args,
+ // Use the more canonical combined form (-L/usr/local/lib) even
+ // though it's less efficient (the split one is just too much of an
+ // eye-sore in the logs).
+ //
+ append_combined_option_values (
+ sargs1,
"-L",
b, x,
- [] (const dir_path& d) {return d.string ().c_str ();});
+ [] (const dir_path& d) -> const string& {return d.string ();});
+
+ append_args (sargs1);
}
}