[lld] r191268 - [PECOFF] Ignore /debug option.

Rui Ueyama ruiu at google.com
Mon Sep 23 20:37:48 PDT 2013


Author: ruiu
Date: Mon Sep 23 22:37:47 2013
New Revision: 191268

URL: http://llvm.org/viewvc/llvm-project?rev=191268&view=rev
Log:
[PECOFF] Ignore /debug option.

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=191268&r1=191267&r2=191268&view=diff
==============================================================================
--- lld/trunk/lib/Driver/WinLinkDriver.cpp (original)
+++ lld/trunk/lib/Driver/WinLinkDriver.cpp Mon Sep 23 22:37:47 2013
@@ -406,6 +406,12 @@ bool WinLinkDriver::parse(int argc, cons
       ctx.appendInputSearchPath(ctx.allocateString(inputArg->getValue()));
       break;
 
+    case OPT_debug:
+      // LLD is not yet capable of creating a PDB file, so /debug does not have
+      // any effect, other than disabling dead stripping.
+      ctx.setDeadStripping(false);
+      break;
+
     case OPT_force:
     case OPT_force_unresolved:
       // handle /force or /force:unresolved. We do not currently support

Modified: lld/trunk/lib/Driver/WinLinkOptions.td
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/WinLinkOptions.td?rev=191268&r1=191267&r2=191268&view=diff
==============================================================================
--- lld/trunk/lib/Driver/WinLinkOptions.td (original)
+++ lld/trunk/lib/Driver/WinLinkOptions.td Mon Sep 23 22:37:47 2013
@@ -40,6 +40,8 @@ def incl_c : Separate<["/", "-"], "inclu
 
 def nodefaultlib_all : F<"nodefaultlib">;
 
+def debug : F<"debug">;
+
 def force : F<"force">,
     HelpText<"Allow undefined symbols when creating executables">;
 def force_unresolved : F<"force:unresolved">;

Modified: lld/trunk/unittests/DriverTests/WinLinkDriverTest.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/unittests/DriverTests/WinLinkDriverTest.cpp?rev=191268&r1=191267&r2=191268&view=diff
==============================================================================
--- lld/trunk/unittests/DriverTests/WinLinkDriverTest.cpp (original)
+++ lld/trunk/unittests/DriverTests/WinLinkDriverTest.cpp Mon Sep 23 22:37:47 2013
@@ -304,6 +304,11 @@ TEST_F(WinLinkParserTest, NoAllowIsolati
   EXPECT_FALSE(_context.getAllowIsolation());
 }
 
+TEST_F(WinLinkParserTest, Debug) {
+  EXPECT_FALSE(parse("link.exe", "/debug", "a.out", nullptr));
+  EXPECT_FALSE(_context.deadStrip());
+}
+
 TEST_F(WinLinkParserTest, Fixed) {
   EXPECT_FALSE(parse("link.exe", "/fixed", "a.out", nullptr));
   EXPECT_FALSE(_context.getBaseRelocationEnabled());





More information about the llvm-commits mailing list