forked from OSchip/llvm-project
parent
378a462c1a
commit
5ee413eda8
|
@ -406,6 +406,12 @@ bool WinLinkDriver::parse(int argc, const char *argv[], PECOFFLinkingContext &ct
|
|||
ctx.appendInputSearchPath(ctx.allocateString(inputArg->getValue()));
|
||||
break;
|
||||
|
||||
case OPT_debug:
|
||||
// LLD is not yet capable of creating a PDB file, so /debug does not have
|
||||
// any effect, other than disabling dead stripping.
|
||||
ctx.setDeadStripping(false);
|
||||
break;
|
||||
|
||||
case OPT_force:
|
||||
case OPT_force_unresolved:
|
||||
// handle /force or /force:unresolved. We do not currently support
|
||||
|
|
|
@ -40,6 +40,8 @@ def incl_c : Separate<["/", "-"], "include">, Alias<incl>;
|
|||
|
||||
def nodefaultlib_all : F<"nodefaultlib">;
|
||||
|
||||
def debug : F<"debug">;
|
||||
|
||||
def force : F<"force">,
|
||||
HelpText<"Allow undefined symbols when creating executables">;
|
||||
def force_unresolved : F<"force:unresolved">;
|
||||
|
|
|
@ -304,6 +304,11 @@ TEST_F(WinLinkParserTest, NoAllowIsolation) {
|
|||
EXPECT_FALSE(_context.getAllowIsolation());
|
||||
}
|
||||
|
||||
TEST_F(WinLinkParserTest, Debug) {
|
||||
EXPECT_FALSE(parse("link.exe", "/debug", "a.out", nullptr));
|
||||
EXPECT_FALSE(_context.deadStrip());
|
||||
}
|
||||
|
||||
TEST_F(WinLinkParserTest, Fixed) {
|
||||
EXPECT_FALSE(parse("link.exe", "/fixed", "a.out", nullptr));
|
||||
EXPECT_FALSE(_context.getBaseRelocationEnabled());
|
||||
|
|
Loading…
Reference in New Issue