From b19fe69cdd0d32dc45f166447170bc5c9c54ac5a Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 24 Feb 2020 14:14:45 +0200 Subject: Extract version for lld-link --- libbuild2/bin/init.cxx | 37 +++++++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) (limited to 'libbuild2/bin/init.cxx') diff --git a/libbuild2/bin/init.cxx b/libbuild2/bin/init.cxx index 4565eb8..f6faab5 100644 --- a/libbuild2/bin/init.cxx +++ b/libbuild2/bin/init.cxx @@ -781,17 +781,46 @@ namespace build2 // if (verb >= (p.second ? 2 : 3)) { - text << "bin.ld " << project (rs) << '@' << rs << '\n' + diag_record dr (text); + + { + dr << "bin.ld " << project (rs) << '@' << rs << '\n' << " ld " << ldi.path << '\n' - << " id " << ldi.id << '\n' - << " signature " << ldi.signature << '\n' - << " checksum " << ldi.checksum; + << " id " << ldi.id << '\n'; + } + + if (ldi.version) + { + dr << " version " << ldi.version->string () << '\n' + << " major " << ldi.version->major << '\n' + << " minor " << ldi.version->minor << '\n' + << " patch " << ldi.version->patch << '\n'; + } + + if (ldi.version && !ldi.version->build.empty ()) + { + dr << " build " << ldi.version->build << '\n'; + } + + dr << " signature " << ldi.signature << '\n' + << " checksum " << ldi.checksum; } rs.assign ("bin.ld.path") = move (ldi.path); rs.assign ("bin.ld.id") = move (ldi.id); rs.assign ("bin.ld.signature") = move (ldi.signature); rs.assign ("bin.ld.checksum") = move (ldi.checksum); + + if (ldi.version) + { + semantic_version& v (*ldi.version); + + rs.assign ("bin.ld.version") = v.string (); + rs.assign ("bin.ld.version.major") = v.major; + rs.assign ("bin.ld.version.minor") = v.minor; + rs.assign ("bin.ld.version.patch") = v.patch; + rs.assign ("bin.ld.version.build") = move (v.build); + } } return true; -- cgit v1.1