diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2018-08-14 14:06:23 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2018-08-14 14:06:23 +0200 |
commit | 70a76a8a03f0390b44d372fb8816cf529a9f1c35 (patch) | |
tree | 303d0447705e81397bb2cf4b0ed069cbcd06366c /build2/bin/init.cxx | |
parent | 3cad4e39c8d20e1811c75d4c83aa108185bd0a47 (diff) |
Use thin archives if available for utility libraries
Thin archives are supported by GNU ar since binutils 2.19.1 and LLVM ar since
LLVM 3.8.0.
Diffstat (limited to 'build2/bin/init.cxx')
-rw-r--r-- | build2/bin/init.cxx | 34 |
1 files changed, 29 insertions, 5 deletions
diff --git a/build2/bin/init.cxx b/build2/bin/init.cxx index ea4a0f1..7e022fda 100644 --- a/build2/bin/init.cxx +++ b/build2/bin/init.cxx @@ -584,11 +584,25 @@ namespace build2 { diag_record dr (text); - dr << "bin.ar " << project (r) << '@' << r.out_path () << '\n' - << " ar " << ari.ar_path << '\n' - << " id " << ari.ar_id << '\n' - << " signature " << ari.ar_signature << '\n' - << " checksum " << ari.ar_checksum; + { + dr << "bin.ar " << project (r) << '@' << r.out_path () << '\n' + << " ar " << ari.ar_path << '\n' + << " id " << ari.ar_id << '\n' + << " version " << ari.ar_version.string () << '\n' + << " major " << ari.ar_version.major << '\n' + << " minor " << ari.ar_version.minor << '\n' + << " patch " << ari.ar_version.patch << '\n'; + } + + if (!ari.ar_version.build.empty ()) + { + dr << " build " << ari.ar_version.build << '\n'; + } + + { + dr << " signature " << ari.ar_signature << '\n' + << " checksum " << ari.ar_checksum; + } if (ranlib != nullptr) { @@ -605,6 +619,16 @@ namespace build2 r.assign<string> ("bin.ar.signature") = move (ari.ar_signature); r.assign<string> ("bin.ar.checksum") = move (ari.ar_checksum); + { + semantic_version& v (ari.ar_version); + + r.assign<string> ("bin.ar.version") = v.string (); + r.assign<uint64_t> ("bin.ar.version.major") = v.major; + r.assign<uint64_t> ("bin.ar.version.minor") = v.minor; + r.assign<uint64_t> ("bin.ar.version.patch") = v.patch; + r.assign<string> ("bin.ar.version.build") = move (v.build); + } + if (ranlib != nullptr) { r.assign<process_path> ("bin.ranlib.path") = move (ari.ranlib_path); |