diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-03-07 14:48:46 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-03-07 14:48:46 +0200 |
commit | e2210969b337f3888ba9fb7617a009ca9bb2979a (patch) | |
tree | 678fa5d862f02d8f0a6d9278edc060fa7fd491b7 | |
parent | 4854da9ba94fc107ff3dcd7eac4e12cecacd9b2e (diff) |
Use cxx.checksum value in cxx.compile depdb
-rw-r--r-- | build2/cxx/compile.cxx | 22 | ||||
-rw-r--r-- | build2/cxx/guess.cxx | 1 |
2 files changed, 11 insertions, 12 deletions
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<string> (*rs["config.cxx"])); + const string& cs (as<string> (*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<lib> () || pt.is_a<liba> () || pt.is_a<libso> ()) - 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<objso> ()) { 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;}); diff --git a/build2/cxx/guess.cxx b/build2/cxx/guess.cxx index 5bef746..1f5fc62 100644 --- a/build2/cxx/guess.cxx +++ b/build2/cxx/guess.cxx @@ -7,7 +7,6 @@ #include <cstring> // strlen() #include <iostream> // cerr -#include <butl/sha256> #include <butl/process> #include <butl/fdstream> |