From e2210969b337f3888ba9fb7617a009ca9bb2979a Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 7 Mar 2016 14:48:46 +0200 Subject: Use cxx.checksum value in cxx.compile depdb --- build2/cxx/compile.cxx | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'build2/cxx/compile.cxx') diff --git a/build2/cxx/compile.cxx b/build2/cxx/compile.cxx index 70ff4a0..6382188 100644 --- a/build2/cxx/compile.cxx +++ b/build2/cxx/compile.cxx @@ -159,12 +159,12 @@ namespace build2 // Then the compiler checksum. // { - sha256 csum (as (*rs["config.cxx"])); + const string& cs (as (*rs["cxx.checksum"])); dl = dd.read (); - if (dl == nullptr || *dl != csum.string ()) + if (dl == nullptr || *dl != cs) { - dd.write (csum.string ()); + dd.write (cs); if (dl != nullptr) l4 ([&]{trace << "compiler mismatch forcing update of " << t;}); @@ -177,7 +177,7 @@ namespace build2 // The idea is to keep them exactly as they are passed to the // compiler since the order may be significant. // - sha256 csum; + sha256 cs; // Hash cxx.export.poptions from prerequisite libraries. // @@ -186,23 +186,23 @@ namespace build2 target& pt (*p.target); // Already searched and matched. if (pt.is_a () || pt.is_a () || pt.is_a ()) - hash_lib_options (csum, pt, "cxx.export.poptions"); + hash_lib_options (cs, pt, "cxx.export.poptions"); } - hash_options (csum, t, "cxx.poptions"); - hash_options (csum, t, "cxx.coptions"); - hash_std (csum, t); + hash_options (cs, t, "cxx.poptions"); + hash_options (cs, t, "cxx.coptions"); + hash_std (cs, t); if (t.is_a ()) { if (sys != "darwin") - csum.append ("-fPIC"); + cs.append ("-fPIC"); } dl = dd.read (); - if (dl == nullptr || *dl != csum.string ()) + if (dl == nullptr || *dl != cs.string ()) { - dd.write (csum.string ()); + dd.write (cs.string ()); if (dl != nullptr) l4 ([&]{trace << "options mismatch forcing update of " << t;}); -- cgit v1.1