diff options
author | Rui Ueyama <ruiu@google.com> | 2014-08-11 21:31:07 +0000 |
---|---|---|
committer | Rui Ueyama <ruiu@google.com> | 2014-08-11 21:31:07 +0000 |
commit | bff29b78b519baf4f9d0747eddf73e383c7dc4ad (patch) | |
tree | e98466b49c52539545764238813683d41da40c83 | |
parent | 23430ccb042f11eda205c390d4c2a0d07d08b2e6 (diff) | |
download | bcm5719-llvm-bff29b78b519baf4f9d0747eddf73e383c7dc4ad.tar.gz bcm5719-llvm-bff29b78b519baf4f9d0747eddf73e383c7dc4ad.zip |
[PECOFF] Fix /profile option.
/profile implies /fixed:no -- so we had to *enable* base
relocations rather than disabling it.
llvm-svn: 215389
-rw-r--r-- | lld/lib/Driver/WinLinkDriver.cpp | 4 | ||||
-rw-r--r-- | lld/unittests/DriverTests/WinLinkDriverTest.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lld/lib/Driver/WinLinkDriver.cpp b/lld/lib/Driver/WinLinkDriver.cpp index 330b80612ad..45c2cd01ab1 100644 --- a/lld/lib/Driver/WinLinkDriver.cpp +++ b/lld/lib/Driver/WinLinkDriver.cpp @@ -1166,8 +1166,8 @@ bool WinLinkDriver::parse(int argc, const char *argv[], case OPT_profile: // /profile implies /opt:ref, /opt:noicf, /incremental:no and /fixed:no. ctx.setDeadStripping(true); - ctx.setBaseRelocationEnabled(false); - ctx.setDynamicBaseEnabled(false); + ctx.setBaseRelocationEnabled(true); + ctx.setDynamicBaseEnabled(true); break; case OPT_implib: diff --git a/lld/unittests/DriverTests/WinLinkDriverTest.cpp b/lld/unittests/DriverTests/WinLinkDriverTest.cpp index c713b9c3e5d..855af939bd1 100644 --- a/lld/unittests/DriverTests/WinLinkDriverTest.cpp +++ b/lld/unittests/DriverTests/WinLinkDriverTest.cpp @@ -658,8 +658,8 @@ TEST_F(WinLinkParserTest, OptUnknown) { TEST_F(WinLinkParserTest, Profile) { EXPECT_TRUE(parse("link.exe", "/profile", "a.obj", nullptr)); EXPECT_TRUE(_context.deadStrip()); - EXPECT_FALSE(_context.getBaseRelocationEnabled()); - EXPECT_FALSE(_context.getDynamicBaseEnabled()); + EXPECT_TRUE(_context.getBaseRelocationEnabled()); + EXPECT_TRUE(_context.getDynamicBaseEnabled()); } // |