diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-07-11 05:56:17 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-07-11 05:56:17 +0200 |
commit | fac576a331d6587e4343d09d6caf959d9a776118 (patch) | |
tree | 93057af1757ca47cf603ebba895bdd2416cf6c05 /build2/bin/guess | |
parent | 80f55f5857d340c31fcd951f645d3f337ed66a6b (diff) |
Add bin.ld sub-module
Diffstat (limited to 'build2/bin/guess')
-rw-r--r-- | build2/bin/guess | 36 |
1 files changed, 33 insertions, 3 deletions
diff --git a/build2/bin/guess b/build2/bin/guess index a80539e..d6ff76d 100644 --- a/build2/bin/guess +++ b/build2/bin/guess @@ -28,7 +28,7 @@ namespace build2 // a toolchain-specific manner (usually the output of --version/-V) and // is not bulletproof. // - struct bin_info + struct ar_info { string ar_id; string ar_signature; @@ -43,8 +43,38 @@ namespace build2 // attemplated and the returned ranlib_* members will be left empty as // well. // - bin_info - guess (const path& ar, const path& ranlib); + ar_info + guess_ar (const path& ar, const path& ranlib); + + // ld information. + // + // Currently recognized ld and their ids: + // + // gnu GNU binutils ld.bfd + // gold GNU binutils ld.gold + // llvm LLVM lld (note: not llvm-ld or llvm-link) + // ld64 Apple's new linker + // cctools Apple's old/classic linker + // msvc Microsoft's link.exe + // + // Note that BSDs are currently using GNU ld but some of them (e.g., + // FreeBSD) are hoping to migrate to lld. + // + // The signature is normally the --version/-version/-v line. + // + // The checksum is used to detect ld changes. It is calculated in a + // toolchain-specific manner (usually the output of --version/-version/-v) + // and is not bulletproof. + // + struct ld_info + { + string ld_id; + string ld_signature; + string ld_checksum; + }; + + ld_info + guess_ld (const path& ld); } } |