[lld] r189614 - [PECOFF] Add /force:unresolved command line option as a synonym of /force.

Rui Ueyama ruiu at google.com
Thu Aug 29 14:46:48 PDT 2013


Author: ruiu
Date: Thu Aug 29 16:46:47 2013
New Revision: 189614

URL: http://llvm.org/viewvc/llvm-project?rev=189614&view=rev
Log:
[PECOFF] Add /force:unresolved command line option as a synonym of /force.

Modified:
    lld/trunk/lib/Driver/WinLinkDriver.cpp
    lld/trunk/lib/Driver/WinLinkOptions.td
    lld/trunk/unittests/DriverTests/WinLinkDriverTest.cpp

Modified: lld/trunk/lib/Driver/WinLinkDriver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/WinLinkDriver.cpp?rev=189614&r1=189613&r2=189614&view=diff
==============================================================================
--- lld/trunk/lib/Driver/WinLinkDriver.cpp (original)
+++ lld/trunk/lib/Driver/WinLinkDriver.cpp Thu Aug 29 16:46:47 2013
@@ -363,7 +363,9 @@ bool WinLinkDriver::parse(int argc, cons
       break;
 
     case OPT_force:
-      // handle /force
+    case OPT_force_unresolved:
+      // handle /force or /force:unresolved. We do not currently support
+      // /force:multiple.
       ctx.setAllowRemainingUndefines(true);
       break;
 

Modified: lld/trunk/lib/Driver/WinLinkOptions.td
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/WinLinkOptions.td?rev=189614&r1=189613&r2=189614&view=diff
==============================================================================
--- lld/trunk/lib/Driver/WinLinkOptions.td (original)
+++ lld/trunk/lib/Driver/WinLinkOptions.td Thu Aug 29 16:46:47 2013
@@ -30,6 +30,7 @@ def incl_c : Separate<["/", "-"], "inclu
 
 def force : F<"force">,
     HelpText<"Allow undefined symbols when creating executables">;
+def force_unresolved : F<"force:unresolved">;
 
 def ref : F<"opt:ref">;
 def no_ref : F<"opt:noref">,

Modified: lld/trunk/unittests/DriverTests/WinLinkDriverTest.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/unittests/DriverTests/WinLinkDriverTest.cpp?rev=189614&r1=189613&r2=189614&view=diff
==============================================================================
--- lld/trunk/unittests/DriverTests/WinLinkDriverTest.cpp (original)
+++ lld/trunk/unittests/DriverTests/WinLinkDriverTest.cpp Thu Aug 29 16:46:47 2013
@@ -165,6 +165,11 @@ TEST_F(WinLinkParserTest, Force) {
   EXPECT_TRUE(_context.allowRemainingUndefines());
 }
 
+TEST_F(WinLinkParserTest, ForceUnresolved) {
+  EXPECT_FALSE(parse("link.exe", "/force:unresolved", "a.obj", nullptr));
+  EXPECT_TRUE(_context.allowRemainingUndefines());
+}
+
 TEST_F(WinLinkParserTest, NoNxCompat) {
   EXPECT_FALSE(parse("link.exe", "/nxcompat:no", "a.obj", nullptr));
   EXPECT_FALSE(_context.isNxCompat());





More information about the llvm-commits mailing list