aboutsummaryrefslogtreecommitdiff
path: root/build2/cc/guess
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-08-12 12:46:21 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-08-12 17:04:22 +0200
commit0fd7815cbc6557811df4f1b6ffb40461474b8534 (patch)
treef67b2d8a94f85027b3f1c98c4bf9acadd4b27d56 /build2/cc/guess
parent9fa5f73d00905568e8979d0c93ec4a8f645c81d5 (diff)
Implement c/cxx toolchain cross-hinting
Diffstat (limited to 'build2/cc/guess')
-rw-r--r--build2/cc/guess16
1 files changed, 14 insertions, 2 deletions
diff --git a/build2/cc/guess b/build2/cc/guess
index 977e081..d852a5c 100644
--- a/build2/cc/guess
+++ b/build2/cc/guess
@@ -96,7 +96,10 @@ namespace build2
// unlike all the preceding fields, this one takes into account the
// compile options (e.g., -m32).
//
- // The pattern is the toolchain program pattern that could sometimes be
+ // The cc_pattern is the toolchain program pattern that could sometimes be
+ // derived for some toolchains. For example, i686-w64-mingw32-*-4.9.
+ //
+ // The bin_pattern is the binutils program pattern that could sometimes be
// derived for some toolchains. For example, i686-w64-mingw32-*.
//
struct compiler_info
@@ -106,7 +109,8 @@ namespace build2
string signature;
string checksum;
string target;
- string pattern;
+ string cc_pattern;
+ string bin_pattern;
};
// In a sense this is analagous to the language standard which we handle
@@ -119,6 +123,14 @@ namespace build2
const path& xc,
const strings* c_coptions,
const strings* x_coptions);
+
+ // Given a language, toolchain id, and optionally a pattern, return an
+ // appropriate default compiler path.
+ //
+ // For example, for (lang::cxx, gcc, *-4.9) we will get g++-4.9.
+ //
+ path
+ guess_default (lang, const string& cid, const string* pattern);
}
}