summaryrefslogtreecommitdiffstats
path: root/lld/lib/Driver/WinLinkDriver.cpp
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2014-11-25 19:01:01 +0000
committerRui Ueyama <ruiu@google.com>2014-11-25 19:01:01 +0000
commit0d9a181d9d36523cadd6fb17d5465778541ea202 (patch)
tree6a0dbb9cd61f823fcbf191ddee7d4c0c8a5cd689 /lld/lib/Driver/WinLinkDriver.cpp
parentbda193edffea77f7262b041878d5a1d85c917700 (diff)
downloadbcm5719-llvm-0d9a181d9d36523cadd6fb17d5465778541ea202.tar.gz
bcm5719-llvm-0d9a181d9d36523cadd6fb17d5465778541ea202.zip
[PECOFF] Create an empty PDB file if debug option is enabled.
There are many build files in the wild that depend on the fact that link.exe produces a PDB file if /DEBUG option is given. They fail if the file is not created. This patch is to make LLD create an empty (dummy) file to satisfy such build targets. This doesn't do anything other than "touching" the file. If a target depends on the content of the PDB file, this workaround is no help, of course. Otherwise this patch should help build some stuff. llvm-svn: 222773
Diffstat (limited to 'lld/lib/Driver/WinLinkDriver.cpp')
-rw-r--r--lld/lib/Driver/WinLinkDriver.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lld/lib/Driver/WinLinkDriver.cpp b/lld/lib/Driver/WinLinkDriver.cpp
index a5c125fd24a..dc6cc79a9dc 100644
--- a/lld/lib/Driver/WinLinkDriver.cpp
+++ b/lld/lib/Driver/WinLinkDriver.cpp
@@ -1180,6 +1180,7 @@ bool WinLinkDriver::parse(int argc, const char *argv[],
// any effect.
// TODO: This should disable dead stripping. Currently we can't do that
// because removal of associative sections depends on dead stripping.
+ ctx.setDebug(true);
break;
case OPT_verbose:
@@ -1267,6 +1268,10 @@ bool WinLinkDriver::parse(int argc, const char *argv[],
inputFiles.push_back(ctx.allocate(inputArg->getValue()));
break;
+ case OPT_pdb:
+ ctx.setPDBFilePath(inputArg->getValue());
+ break;
+
case OPT_lldmoduledeffile:
ctx.setModuleDefinitionFile(inputArg->getValue());
break;
OpenPOWER on IntegriCloud