From 195de65a84864cf5931325eeb2356f7d98155055 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 21 Jun 2021 11:59:04 +0200 Subject: Add support for automatic generation of symbol exporting .def file --- libbuild2/bin/guess.hxx | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) (limited to 'libbuild2/bin/guess.hxx') diff --git a/libbuild2/bin/guess.hxx b/libbuild2/bin/guess.hxx index 3307999..3a2c219 100644 --- a/libbuild2/bin/guess.hxx +++ b/libbuild2/bin/guess.hxx @@ -16,7 +16,7 @@ namespace build2 // Currently recognized ar/ranlib and their ids: // // gnu GNU binutils - // llvm LLVM ar + // llvm LLVM llvm-ar // bsd FreeBSD (and maybe other BSDs) // msvc Microsoft's lib.exe // msvc-llvm LLVM llvm-lib.exe @@ -133,6 +133,39 @@ namespace build2 const rc_info& guess_rc (const path& rc, const char* paths); + + // nm information. + // + // Currently recognized nm and nm-like utilities and their ids: + // + // gnu GNU binutils nm + // msvc Microsoft's dumpbin.exe + // llvm LLVM llvm-nm + // generic Other/generic/unrecognized + // + // The signature is normally the --version line. + // + // The checksum is used to detect nm changes. It is calculated in a + // toolchain-specific manner (usually the output of --version) and is not + // bulletproof. + // + // The environment is an optional list of environment variables that + // affect the resource compiler result. + // + // Watch out for the environment not to affect any of the extracted + // information since we cache it. + // + struct nm_info + { + process_path path; + string id; + string signature; + string checksum; + const char* const* environment; + }; + + const nm_info& + guess_nm (const path& nm, const char* paths); } } -- cgit v1.1