diff options
Diffstat (limited to 'lld/lib/Driver/WinLinkDriver.cpp')
| -rw-r--r-- | lld/lib/Driver/WinLinkDriver.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lld/lib/Driver/WinLinkDriver.cpp b/lld/lib/Driver/WinLinkDriver.cpp index 6a7aa90d450..27a16d6444f 100644 --- a/lld/lib/Driver/WinLinkDriver.cpp +++ b/lld/lib/Driver/WinLinkDriver.cpp @@ -1062,6 +1062,11 @@ bool WinLinkDriver::parse(int argc, const char *argv[], } else if (auto *hs = dyn_cast<moduledef::Heapsize>(dir.getValue())) { ctx.setHeapReserve(hs->getReserve()); ctx.setHeapCommit(hs->getCommit()); + } else if (auto *lib = dyn_cast<moduledef::Library>(dir.getValue())) { + ctx.setIsDll(true); + ctx.setOutputPath(ctx.allocate(lib->getName())); + if (lib->getBaseAddress() && !ctx.getBaseAddress()) + ctx.setBaseAddress(lib->getBaseAddress()); } else if (auto *name = dyn_cast<moduledef::Name>(dir.getValue())) { if (!name->getOutputPath().empty() && ctx.outputPath().empty()) ctx.setOutputPath(ctx.allocate(name->getOutputPath())); |

