void setManifestUiAccess(std::string val) { _manifestUiAccess = val; }
const std::string &getManifestUiAccess() const { return _manifestUiAccess; }
+ void setManifestDependency(std::string val) { _manifestDependency = val; }
+ const std::string &getManifestDependency() const {
+ return _manifestDependency;
+ }
+
void setImageType(ImageType type) { _imageType = type; }
ImageType getImageType() const { return _imageType; }
int _manifestId;
std::string _manifestLevel;
std::string _manifestUiAccess;
+ std::string _manifestDependency;
ImageType _imageType;
// The set to store /nodefaultlib arguments.
ctx.setManifestOutputPath(ctx.allocateString(inputArg->getValue()));
break;
+ case OPT_manifestdependency:
+ // /manifestdependency:<string> option. Note that the argument will be
+ // embedded to the manifest XML file with no error check, for link.exe
+ // compatibility. We do not gurantete that the resulting XML file is
+ // valid.
+ ctx.setManifestDependency(ctx.allocateString(inputArg->getValue()));
+ break;
+
case OPT_failifmismatch:
if (handleFailIfMismatchOption(inputArg->getValue(), failIfMismatchMap,
diagnostics))
def manifest_colon : P<"manifest", "Create manifest file">;
def manifestuac : P<"manifestuac", "User access control">;
def manifestfile : P<"manifestfile", "Manifest file path">;
+def manifestdependency : P<"manifestdependency",
+ "Attributes for <dependency> in manifest file">;
// We cannot use multiclass P because class name "incl" is different
// from its command line option name. We do this because "include" is
EXPECT_TRUE(_context.getDynamicBaseEnabled());
EXPECT_TRUE(_context.getCreateManifest());
EXPECT_EQ("a.exe.manifest", _context.getManifestOutputPath());
+ EXPECT_EQ("", _context.getManifestDependency());
EXPECT_FALSE(_context.getEmbedManifest());
EXPECT_EQ(1, _context.getManifestId());
EXPECT_EQ("'asInvoker'", _context.getManifestLevel());
}
//
-// Tests for /manifest, /manifestuac, and /manifestfile.
+// Tests for /manifest, /manifestuac, /manifestfile, and /manifestdependency.
//
TEST_F(WinLinkParserTest, Manifest_Default) {
EXPECT_TRUE(parse("link.exe", "/manifest", "a.out", nullptr));
EXPECT_EQ("bar.manifest", _context.getManifestOutputPath());
}
+TEST_F(WinLinkParserTest, Manifestdependency) {
+ EXPECT_TRUE(parse("link.exe", "/manifestdependency:foo bar", "a.out",
+ nullptr));
+ EXPECT_EQ("foo bar", _context.getManifestDependency());
+}
+
//
// Test for command line flags that are ignored.
//