aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/cc/link-rule.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2/cc/link-rule.cxx')
-rw-r--r--libbuild2/cc/link-rule.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/libbuild2/cc/link-rule.cxx b/libbuild2/cc/link-rule.cxx
index 4fbdeda..8da9619 100644
--- a/libbuild2/cc/link-rule.cxx
+++ b/libbuild2/cc/link-rule.cxx
@@ -2312,8 +2312,13 @@ namespace build2
append_options (args, tstd);
}
- append_options (args, t, c_loptions);
+ // Note that these come in the reverse order of coptions since the
+ // library search paths are examined in the order specified (in
+ // contrast to the "last value wins" semantics that we assume for
+ // coptions).
+ //
append_options (args, t, x_loptions);
+ append_options (args, t, c_loptions);
// Extra system library dirs (last).
//