aboutsummaryrefslogtreecommitdiff
path: root/build2/cc/link-rule.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2019-06-21 15:01:41 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2019-06-21 15:01:41 +0200
commit85399cf60764b0fe54d44d4a5bacb54feae8dd62 (patch)
tree8d0bead9007ab1f92c6214e9a0062ff78c798876 /build2/cc/link-rule.cxx
parent131b0a852e70ecd198c4f769aff1435639cd35c6 (diff)
Add support for [config.]{cc,c,cxx}.aoptions (archive options)
In particular, this can be used to suppress lib.exe warnings, for example: cc.aoptions += /IGNORE:4221
Diffstat (limited to 'build2/cc/link-rule.cxx')
-rw-r--r--build2/cc/link-rule.cxx23
1 files changed, 12 insertions, 11 deletions
diff --git a/build2/cc/link-rule.cxx b/build2/cc/link-rule.cxx
index 3b58ab7..588f3ae 100644
--- a/build2/cc/link-rule.cxx
+++ b/build2/cc/link-rule.cxx
@@ -1870,7 +1870,15 @@ namespace build2
{
if (tsys == "win32-msvc")
{
- // No options for lib.exe.
+ // lib.exe has /LIBPATH but it's not clear/documented what it's used
+ // for. Perhaps for link-time code generation (/LTCG)? If that's the
+ // case, then we may need to pass *.loptions.
+ //
+ args.push_back ("/NOLOGO");
+
+ // Add /MACHINE.
+ //
+ args.push_back (msvc_machine (cast<string> (rs[x_target_cpu])));
}
else
{
@@ -1914,6 +1922,9 @@ namespace build2
args.push_back (arg1.c_str ());
}
+
+ append_options (args, t, c_aoptions);
+ append_options (args, t, x_aoptions);
}
else
{
@@ -2172,16 +2183,6 @@ namespace build2
if (tsys == "win32-msvc")
{
- // lib.exe has /LIBPATH but it's not clear/documented what it's used
- // for. Perhaps for link-time code generation (/LTCG)? If that's the
- // case, then we may need to pass *.loptions.
- //
- args.push_back ("/NOLOGO");
-
- // Add /MACHINE.
- //
- args.push_back (msvc_machine (cast<string> (rs[x_target_cpu])));
-
out = "/OUT:" + relt.string ();
args.push_back (out.c_str ());
}