From fae229bbcbc4f69fe8af58ad3e5f3305cca12a02 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 5 Sep 2016 16:11:12 +0200 Subject: 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. --- build2/cc/compile.cxx | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'build2/cc/compile.cxx') 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) -- cgit v1.1