[PECOFF] Ignore /debug option.

llvm-svn: 191268
This commit is contained in:
Rui Ueyama 2013-09-24 03:37:47 +00:00
parent 378a462c1a
commit 5ee413eda8
3 changed files with 13 additions and 0 deletions

View File

@ -406,6 +406,12 @@ bool WinLinkDriver::parse(int argc, const char *argv[], PECOFFLinkingContext &ct
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

View File

@ -40,6 +40,8 @@ def incl_c : Separate<["/", "-"], "include">, Alias<incl>;
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">;

View File

@ -304,6 +304,11 @@ TEST_F(WinLinkParserTest, NoAllowIsolation) {
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());