From 76de594667b370094f5da5c0871c155d788d135e Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 4 Jan 2018 15:35:57 +0200 Subject: Initial support for c/cxx runtime/stdlib detection --- build2/cc/guess.hxx | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'build2/cc/guess.hxx') diff --git a/build2/cc/guess.hxx b/build2/cc/guess.hxx index 86c9793..9d87cb4 100644 --- a/build2/cc/guess.hxx +++ b/build2/cc/guess.hxx @@ -151,8 +151,42 @@ namespace build2 string signature; string checksum; string target; + string original_target; // As reported by the compiler. string pattern; string bin_pattern; + + // Compiler runtime, C standard library, and language (e.g., C++) + // standard library. + // + // The runtime is the low-level compiler runtime library and its name is + // the library/project name. Current values are (but can also be some + // custom name specified with Clang's --rtlib): + // + // libgcc + // compiler-rt (clang) + // msvc + // + // The C standard library is normally the library/project name (e.g, + // glibc, musl, newlib, klibc, etc) but if there is none, then we + // fallback to the vendor name (e.g., freebsd). Proposed values are (any + // BSD-derived libc should end with the *bsd suffix): + // + // glibc + // msvc (msvcrt.lib/msvcrNNN.dll) + // freebsd + // applebsd + // cygwin? (apparently newlib) + // + // The C++ standard library is normally the library/project name. + // Current values are: + // + // libstdc++ + // libc++ + // msvcp (msvcprt.lib/msvcpNNN.dll) + // + string runtime; + string c_stdlib; + string x_stdlib; }; // In a sense this is analagous to the language standard which we handle -- cgit v1.1