aboutsummaryrefslogtreecommitdiff
path: root/build2/cc/compile.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-09-05 16:11:12 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-09-05 16:11:12 +0200
commitfae229bbcbc4f69fe8af58ad3e5f3305cca12a02 (patch)
tree141e3a4335d6449364636717135810edaf996abb /build2/cc/compile.cxx
parent1ada80642d06d8ef5144933178191eba262a1372 (diff)
Change order in which library options are processed
The idea is that we want more "specialized" -I/-L options before more "generic" in order to make sure we don't pick up installed headers or libraries. This is still not bullet-proof though.
Diffstat (limited to 'build2/cc/compile.cxx')
-rw-r--r--build2/cc/compile.cxx22
1 files changed, 11 insertions, 11 deletions
diff --git a/build2/cc/compile.cxx b/build2/cc/compile.cxx
index a89555c..6fd6f16 100644
--- a/build2/cc/compile.cxx
+++ b/build2/cc/compile.cxx
@@ -334,13 +334,13 @@ namespace build2
//
sha256 cs;
+ hash_options (cs, t, c_poptions);
+ hash_options (cs, t, x_poptions);
+
// Hash *.export.poptions from prerequisite libraries.
//
hash_lib_options (cs, t, bs, lo);
- hash_options (cs, t, c_poptions);
- hash_options (cs, t, x_poptions);
-
// Extra system header dirs (last).
//
for (const dir_path& d: sys_inc_dirs)
@@ -514,15 +514,15 @@ namespace build2
{
prefix_map m;
- // First process the include directories from prerequisite libraries.
- //
- append_lib_prefixes (m, t, bs, lo);
-
- // Then process our own.
+ // First process our own.
//
append_prefixes (m, t, c_poptions);
append_prefixes (m, t, x_poptions);
+ // Then process the include directories from prerequisite libraries.
+ //
+ append_lib_prefixes (m, t, bs, lo);
+
return m;
}
@@ -1400,13 +1400,13 @@ namespace build2
path relo (relative (t.path ()));
path rels (relative (s->path ()));
+ append_options (args, t, c_poptions);
+ append_options (args, t, x_poptions);
+
// Add *.export.poptions from prerequisite libraries.
//
append_lib_options (args, t, bs, lo);
- append_options (args, t, c_poptions);
- append_options (args, t, x_poptions);
-
// Extra system header dirs (last).
//
for (const dir_path& d: sys_inc_dirs)