[PECOFF] Enable input file logging if /debug is given.

llvm-svn: 191469
This commit is contained in:
Rui Ueyama 2013-09-26 22:46:04 +00:00
parent 7c1a445c9e
commit 3c6ee599a2
2 changed files with 5 additions and 0 deletions

View File

@ -414,6 +414,9 @@ bool WinLinkDriver::parse(int argc, const char *argv[], PECOFFLinkingContext &ct
// 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);
// Prints out input files during core linking to help debugging.
ctx.setLogInputFiles(true);
break;
case OPT_force:

View File

@ -61,6 +61,7 @@ TEST_F(WinLinkParserTest, Basic) {
EXPECT_TRUE(_context.isTerminalServerAware());
EXPECT_TRUE(_context.getDynamicBaseEnabled());
EXPECT_TRUE(_context.deadStrip());
EXPECT_FALSE(_context.logInputFiles());
}
TEST_F(WinLinkParserTest, StartsWithHyphen) {
@ -318,6 +319,7 @@ TEST_F(WinLinkParserTest, SwapRunFromNet) {
TEST_F(WinLinkParserTest, Debug) {
EXPECT_TRUE(parse("link.exe", "/debug", "a.out", nullptr));
EXPECT_FALSE(_context.deadStrip());
EXPECT_TRUE(_context.logInputFiles());
}
TEST_F(WinLinkParserTest, Fixed) {