diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2018-02-14 12:27:11 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2018-02-14 12:27:11 +0200 |
commit | 8d1735e04faadaa6765c71b12a96188e6d56c9fa (patch) | |
tree | aa5bb1d0a76e1e525bc4dd9cd5177c35d5d532c8 /build2/cc | |
parent | edc9022131b77cec3fe5a662766e36fa9a71d23e (diff) |
Don't ignore objX{} and bmiX{} prerequisites in cc::link_rule
Diffstat (limited to 'build2/cc')
-rw-r--r-- | build2/cc/compile-rule.cxx | 6 | ||||
-rw-r--r-- | build2/cc/link-rule.cxx | 30 | ||||
-rw-r--r-- | build2/cc/pkgconfig.cxx | 5 |
3 files changed, 17 insertions, 24 deletions
diff --git a/build2/cc/compile-rule.cxx b/build2/cc/compile-rule.cxx index 1e1d45d..a6d2d48 100644 --- a/build2/cc/compile-rule.cxx +++ b/build2/cc/compile-rule.cxx @@ -221,7 +221,7 @@ namespace build2 { tracer trace (x, "compile_rule::match"); - bool mod (t.is_a<bmie> () || t.is_a<bmia> () || t.is_a<bmis> ()); + bool mod (t.is_a<bmix> ()); // Link-up to our group (this is the obj/bmi{} target group protocol // which means this can be done whether we match or not). @@ -3481,9 +3481,7 @@ namespace build2 // @@ UTL: we need to (recursively) see through libux{} (and // also in pkgconfig_save()). // - if (bt->is_a<bmis> () || - bt->is_a<bmia> () || - bt->is_a<bmie> ()) + if (bt->is_a<bmix> ()) { const string& n (cast<string> (bt->vars[c_module_name])); diff --git a/build2/cc/link-rule.cxx b/build2/cc/link-rule.cxx index cd355c6..c59597a 100644 --- a/build2/cc/link-rule.cxx +++ b/build2/cc/link-rule.cxx @@ -630,12 +630,15 @@ namespace build2 // else { - // @@ Temporary hack until we get the default outer operation for - // update. This allows operations like test and install to skip - // such tacked on stuff. - // - if (current_outer_oif != nullptr) - continue; + if (!p.is_a<objx> () && !p.is_a<bmix> ()) + { + // @@ Temporary hack until we get the default outer operation + // for update. This allows operations like test and install to + // skip such tacked on stuff. + // + if (current_outer_oif != nullptr) + continue; + } pt = &p.search (t); } @@ -792,8 +795,7 @@ namespace build2 if (p1.is_a<fsdir> () || p1.is_a<libx> () || p1.is_a<liba> () || p1.is_a<libs> () || p1.is_a<libux> () || - p1.is_a<bmi> () || - p1.is_a<bmie> () || p1.is_a<bmia> () || p1.is_a<bmis> () || + p1.is_a<bmi> () || p1.is_a<bmix> () || (p.is_a (mod ? *x_mod : x_src) && x_header (p1)) || (p.is_a<c> () && p1.is_a<h> ())) continue; @@ -1555,16 +1557,14 @@ namespace build2 // if (modules) { - if (pt->is_a<bmie> () || pt->is_a<bmia> () || pt->is_a<bmis> ()) + if (pt->is_a<bmix> ()) pt = pt->member; } const file* f; bool la (false), ls (false); - if ((f = pt->is_a<obje> ()) || - (f = pt->is_a<obja> ()) || - (f = pt->is_a<objs> ()) || + if ((f = pt->is_a<objx> ()) || (!lt.static_library () && // @@ UTL: TODO libua to liba link. ((la = (f = pt->is_a<liba> ())) || (la = (f = pt->is_a<libux> ())) || @@ -1841,16 +1841,14 @@ namespace build2 if (modules) { - if (pt->is_a<bmie> () || pt->is_a<bmia> () || pt->is_a<bmis> ()) + if (pt->is_a<bmix> ()) pt = pt->member; } const file* f; bool la (false), ls (false); - if ((f = pt->is_a<obje> ()) || - (f = pt->is_a<obja> ()) || - (f = pt->is_a<objs> ()) || + if ((f = pt->is_a<objx> ()) || (!lt.static_library () && // @@ UTL: TODO libua to liba link. ((la = (f = pt->is_a<liba> ())) || (la = (f = pt->is_a<libux> ())) || diff --git a/build2/cc/pkgconfig.cxx b/build2/cc/pkgconfig.cxx index 697a60e..9d52db9 100644 --- a/build2/cc/pkgconfig.cxx +++ b/build2/cc/pkgconfig.cxx @@ -1345,10 +1345,7 @@ namespace build2 // @@ UTL: we need to (recursively) see through libux{} (and // also in search_modules()). // - if (pt != nullptr && - (pt->is_a<bmis> () || - pt->is_a<bmia> () || - pt->is_a<bmie> ())) + if (pt != nullptr && pt->is_a<bmix> ()) { // What we have is a binary module interface. What we need is // a module interface source it was built from. We assume it's |