aboutsummaryrefslogtreecommitdiff
path: root/COFF/Driver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'COFF/Driver.cpp')
-rw-r--r--COFF/Driver.cpp26
1 files changed, 19 insertions, 7 deletions
diff --git a/COFF/Driver.cpp b/COFF/Driver.cpp
index 35f4a04866c5..6df59e4b08df 100644
--- a/COFF/Driver.cpp
+++ b/COFF/Driver.cpp
@@ -899,18 +899,25 @@ void LinkerDriver::link(ArrayRef<const char *> ArgsArr) {
for (auto *Arg : Args.filtered(OPT_section))
parseSection(Arg->getValue());
- // Handle /manifest
- if (auto *Arg = Args.getLastArg(OPT_manifest_colon))
- parseManifest(Arg->getValue());
+ // Handle /manifestdependency. This enables /manifest unless /manifest:no is
+ // also passed.
+ if (auto *Arg = Args.getLastArg(OPT_manifestdependency)) {
+ Config->ManifestDependency = Arg->getValue();
+ Config->Manifest = Configuration::SideBySide;
+ }
+
+ // Handle /manifest and /manifest:
+ if (auto *Arg = Args.getLastArg(OPT_manifest, OPT_manifest_colon)) {
+ if (Arg->getOption().getID() == OPT_manifest)
+ Config->Manifest = Configuration::SideBySide;
+ else
+ parseManifest(Arg->getValue());
+ }
// Handle /manifestuac
if (auto *Arg = Args.getLastArg(OPT_manifestuac))
parseManifestUAC(Arg->getValue());
- // Handle /manifestdependency
- if (auto *Arg = Args.getLastArg(OPT_manifestdependency))
- Config->ManifestDependency = Arg->getValue();
-
// Handle /manifestfile
if (auto *Arg = Args.getLastArg(OPT_manifestfile))
Config->ManifestFile = Arg->getValue();
@@ -919,6 +926,11 @@ void LinkerDriver::link(ArrayRef<const char *> ArgsArr) {
for (auto *Arg : Args.filtered(OPT_manifestinput))
Config->ManifestInput.push_back(Arg->getValue());
+ if (!Config->ManifestInput.empty() &&
+ Config->Manifest != Configuration::Embed) {
+ fatal("/MANIFESTINPUT: requires /MANIFEST:EMBED");
+ }
+
// Handle miscellaneous boolean flags.
if (Args.hasArg(OPT_allowisolation_no))
Config->AllowIsolation = false;