aboutsummaryrefslogtreecommitdiff
path: root/build2/cc/link.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-05-25 11:32:01 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-05-25 11:32:01 +0200
commit71d9aedda0919fb22e39d6e6ce60506ceb69812e (patch)
tree585afc25774555047ff41dc865c617732caf5ff2 /build2/cc/link.cxx
parenta1f459f8446370704695919b3131653300866ee9 (diff)
Add compiler_id enum
Diffstat (limited to 'build2/cc/link.cxx')
-rw-r--r--build2/cc/link.cxx20
1 files changed, 11 insertions, 9 deletions
diff --git a/build2/cc/link.cxx b/build2/cc/link.cxx
index 1b2f306..e2b8275 100644
--- a/build2/cc/link.cxx
+++ b/build2/cc/link.cxx
@@ -355,7 +355,7 @@ namespace build2
}
case otype::a:
{
- if (cid == "msvc")
+ if (cid == compiler_id::msvc)
e = "lib";
else
{
@@ -388,8 +388,8 @@ namespace build2
// PDB
//
- if (lt != otype::a &&
- cid == "msvc" &&
+ if (lt != otype::a &&
+ cid == compiler_id::msvc &&
(find_option ("/DEBUG", t, c_loptions, true) ||
find_option ("/DEBUG", t, x_loptions, true)))
{
@@ -1140,7 +1140,9 @@ namespace build2
//
const string& cs (
cast<string> (
- rs[cid == "msvc" ? var_pool["bin.ld.checksum"] : x_checksum]));
+ rs[cid == compiler_id::msvc
+ ? var_pool["bin.ld.checksum"]
+ : x_checksum]));
if (dd.expect (cs) != nullptr)
l4 ([&]{trace << "linker mismatch forcing update of " << t;});
@@ -1169,7 +1171,7 @@ namespace build2
if (lt == otype::a)
{
- if (cid == "msvc") ;
+ if (cid == compiler_id::msvc) ;
else
{
// If the user asked for ranlib, don't try to do its function with
@@ -1181,7 +1183,7 @@ namespace build2
}
else
{
- if (cid == "msvc")
+ if (cid == compiler_id::msvc)
{
// We are using link.exe directly so don't pass the compiler
// options.
@@ -1362,7 +1364,7 @@ namespace build2
{
ld = &cast<process_path> (rs["bin.ar.path"]);
- if (cid == "msvc")
+ if (cid == compiler_id::msvc)
{
// lib.exe has /LIBPATH but it's not clear/documented what it's
// used for. Perhaps for link-time code generation (/LTCG)? If
@@ -1387,7 +1389,7 @@ namespace build2
case otype::e:
case otype::s:
{
- if (cid == "msvc")
+ if (cid == compiler_id::msvc)
{
// Using link.exe directly.
//
@@ -1616,7 +1618,7 @@ namespace build2
// something like this) we are going to redirect stdout to stderr. For
// sane compilers this should be harmless.
//
- bool filter (cid == "msvc" && lt != otype::a);
+ bool filter (cid == compiler_id::msvc && lt != otype::a);
process pr (*ld, args.data (), 0, (filter ? -1 : 2));