diff options
Diffstat (limited to 'lld/lib/Driver/WinLinkDriver.cpp')
| -rw-r--r-- | lld/lib/Driver/WinLinkDriver.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lld/lib/Driver/WinLinkDriver.cpp b/lld/lib/Driver/WinLinkDriver.cpp index d4fb892b6e4..d6f6f3da638 100644 --- a/lld/lib/Driver/WinLinkDriver.cpp +++ b/lld/lib/Driver/WinLinkDriver.cpp @@ -496,6 +496,10 @@ WinLinkDriver::parse(int argc, const char *argv[], PECOFFLinkingContext &ctx, break; } + case OPT_manifestfile: + ctx.setManifestOutputPath(ctx.allocateString(inputArg->getValue())); + break; + case OPT_failifmismatch: if (handleFailIfMismatchOption(inputArg->getValue(), failIfMismatchMap, diagnostics)) @@ -639,6 +643,14 @@ WinLinkDriver::parse(int argc, const char *argv[], PECOFFLinkingContext &ctx, ctx.setOutputPath(replaceExtension(ctx, path, ".exe")); } + // Default name of the manifest file is "foo.exe.manifest" where "foo.exe" is + // the output path. + if (ctx.getManifestOutputPath().empty()) { + std::string path = ctx.outputPath(); + path.append(".manifest"); + ctx.setManifestOutputPath(ctx.allocateString(path)); + } + // If the core linker already started, we need to explicitly call parse() for // each input element, because the pass to parse input files in Driver::link // has already done. |

