ctx.setSwapRunFromNet(true);
break;
+ case OPT_profile:
+ // /profile implies /opt:ref, /opt:noicf, /incremental:no and /fixed:no.
+ ctx.setDeadStripping(true);
+ ctx.setBaseRelocationEnabled(false);
+ ctx.setDynamicBaseEnabled(false);
+ break;
+
case OPT_implib:
ctx.setOutputImportLibraryPath(inputArg->getValue());
break;
def debug : F<"debug">;
def swaprun_cd : F<"swaprun:cd">;
def swaprun_net : F<"swaprun:net">;
+def profile : F<"profile">;
def force : F<"force">,
HelpText<"Allow undefined symbols when creating executables">;
}
//
+// Test for /PROFILE
+//
+
+TEST_F(WinLinkParserTest, Profile) {
+ EXPECT_TRUE(parse("link.exe", "/profile", "a.obj", nullptr));
+ EXPECT_TRUE(_context.deadStrip());
+ EXPECT_FALSE(_context.getBaseRelocationEnabled());
+ EXPECT_FALSE(_context.getDynamicBaseEnabled());
+}
+
+//
// Test for command line flags that are ignored.
//