summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2013-07-25 22:46:49 +0000
committerRui Ueyama <ruiu@google.com>2013-07-25 22:46:49 +0000
commitdc6983ca13a32c3397ec4a75c02c4707f1d0d207 (patch)
treefd28ed35914ec3f2785fd6e0584780af2c2a493b
parent50e67c7371a2449f10c17a06ccb4d16e890e3ed1 (diff)
downloadbcm5719-llvm-dc6983ca13a32c3397ec4a75c02c4707f1d0d207.tar.gz
bcm5719-llvm-dc6983ca13a32c3397ec4a75c02c4707f1d0d207.zip
[PECOFF][Driver] Add /nologo command line option.
llvm-svn: 187162
-rw-r--r--lld/lib/Driver/WinLinkOptions.td3
-rw-r--r--lld/unittests/DriverTests/WinLinkDriverTest.cpp8
2 files changed, 11 insertions, 0 deletions
diff --git a/lld/lib/Driver/WinLinkOptions.td b/lld/lib/Driver/WinLinkOptions.td
index 1456a6bd70e..ca42291177e 100644
--- a/lld/lib/Driver/WinLinkOptions.td
+++ b/lld/lib/Driver/WinLinkOptions.td
@@ -63,5 +63,8 @@ def incl_c : _Joined<"include:", incl>;
def failifmismatch : _Separate<"failifmismatch">;
def failifmismatch_c : _Joined<"failifmismatch:", failifmismatch>;
+// NOLOGO does nothing. It is defined only for link.exe compatibility.
+def nologo : _Flag<"nologo">;
+
def help : _Flag<"help">;
def help_q : _Flag<"?">, Alias<help>;
diff --git a/lld/unittests/DriverTests/WinLinkDriverTest.cpp b/lld/unittests/DriverTests/WinLinkDriverTest.cpp
index 6d5ae05ee7b..89fea5a3097 100644
--- a/lld/unittests/DriverTests/WinLinkDriverTest.cpp
+++ b/lld/unittests/DriverTests/WinLinkDriverTest.cpp
@@ -198,4 +198,12 @@ 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));
+ EXPECT_EQ("", errorMessage());
+ EXPECT_EQ(1, inputFileCount());
+ EXPECT_EQ("a.obj", inputFile(0));
+}
+
} // end anonymous namespace
OpenPOWER on IntegriCloud