summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2013-09-26 22:46:04 +0000
committerRui Ueyama <ruiu@google.com>2013-09-26 22:46:04 +0000
commit3c6ee599a2a9e43f70bbae277cfd41db9a30f35c (patch)
treeaa723dee8a7444e178eecba65da4919d420710a7
parent7c1a445c9ea6317a8a63e2068282d5cffbadd1fe (diff)
downloadbcm5719-llvm-3c6ee599a2a9e43f70bbae277cfd41db9a30f35c.tar.gz
bcm5719-llvm-3c6ee599a2a9e43f70bbae277cfd41db9a30f35c.zip
[PECOFF] Enable input file logging if /debug is given.
llvm-svn: 191469
-rw-r--r--lld/lib/Driver/WinLinkDriver.cpp3
-rw-r--r--lld/unittests/DriverTests/WinLinkDriverTest.cpp2
2 files changed, 5 insertions, 0 deletions
diff --git a/lld/lib/Driver/WinLinkDriver.cpp b/lld/lib/Driver/WinLinkDriver.cpp
index 8c769a70358..80ea91a1147 100644
--- a/lld/lib/Driver/WinLinkDriver.cpp
+++ b/lld/lib/Driver/WinLinkDriver.cpp
@@ -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:
diff --git a/lld/unittests/DriverTests/WinLinkDriverTest.cpp b/lld/unittests/DriverTests/WinLinkDriverTest.cpp
index 55defc838f8..9f801de1899 100644
--- a/lld/unittests/DriverTests/WinLinkDriverTest.cpp
+++ b/lld/unittests/DriverTests/WinLinkDriverTest.cpp
@@ -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) {
OpenPOWER on IntegriCloud