[PECOFF] Ignore /errorReport command line option.

/errorReport is a command line option to let the linker to report internal
linker error information to Microsoft. For LLD that option doesn't make any
sense, so it just ignores the option.

llvm-svn: 191044
This commit is contained in:
Rui Ueyama 2013-09-19 22:19:40 +00:00
parent d0a869d0bf
commit 91a95a590a
2 changed files with 13 additions and 6 deletions

View File

@ -56,10 +56,15 @@ def tsaware : F<"tsaware">;
def no_tsaware : F<"tsaware:no">,
HelpText<"Create non-Terminal Server aware executable">;
// NOLOGO does nothing. It is defined only for link.exe compatibility.
def nologo : F<"nologo">;
def help : F<"help">;
def help_q : F<"?">, Alias<help>;
def DASH_DASH : Option<["--"], "", KIND_REMAINING_ARGS>;
// The flags below do nothing. They are defined only for link.exe compatibility.
multiclass Q<string name> {
def "" : Joined<["/", "-", "-?"], name#":">;
def _c : Separate<["/", "-", "-?"], name>, Alias<!cast<Option>(name)>;
}
def nologo : F<"nologo">;
defm errorreport : Q<"errorreport">;

View File

@ -256,9 +256,11 @@ TEST_F(WinLinkParserTest, FailIfMismatch_Mismatch) {
"/failifmismatch:foo=baz", "a.out", nullptr));
}
TEST_F(WinLinkParserTest, Nologo) {
// NOLOGO flag is for link.exe compatibility. It's recognized but is ignored.
EXPECT_FALSE(parse("link.exe", "/nologo", "a.obj", nullptr));
TEST_F(WinLinkParserTest, Ignore) {
// There are some no-op command line options that are recognized for
// compatibility with link.exe.
EXPECT_FALSE(parse("link.exe", "/nologo", "/errorreport:prompt", "a.obj",
nullptr));
EXPECT_EQ("", errorMessage());
EXPECT_EQ(1, inputFileCount());
EXPECT_EQ("a.obj", inputFile(0));