From c13f43f4f95edcd0138e3385944c6ca84ad70617 Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Wed, 6 Nov 2013 00:44:10 +0000 Subject: [PATCH] [PECOFF] Ignore /disallowlib. msvcrt.lib contains "/disallowlib" command line option in its .drectve section. I couldn't spot any documentation for the option. Ignore it for now so that we can link the library without error. llvm-svn: 194114 --- lld/lib/Driver/WinLinkOptions.td | 1 + lld/unittests/DriverTests/WinLinkDriverTest.cpp | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lld/lib/Driver/WinLinkOptions.td b/lld/lib/Driver/WinLinkOptions.td index 8d6a934dc869..0264643861d8 100644 --- a/lld/lib/Driver/WinLinkOptions.td +++ b/lld/lib/Driver/WinLinkOptions.td @@ -92,6 +92,7 @@ def verbose : F<"verbose">; def delay : QF<"delay">; def delayload : QF<"delayload">; +def disallowlib : QF<"disallowlib">; def errorreport : QF<"errorreport">; def pdb : QF<"pdb">; def pdbaltpath : QF<"pdbaltpath">; diff --git a/lld/unittests/DriverTests/WinLinkDriverTest.cpp b/lld/unittests/DriverTests/WinLinkDriverTest.cpp index 01b34b64c069..c4403a7d8ba8 100644 --- a/lld/unittests/DriverTests/WinLinkDriverTest.cpp +++ b/lld/unittests/DriverTests/WinLinkDriverTest.cpp @@ -463,9 +463,9 @@ TEST_F(WinLinkParserTest, Ignore) { // compatibility with link.exe. EXPECT_TRUE(parse("link.exe", "/nologo", "/errorreport:prompt", "/incremental", "/incremental:no", "/delay:unload", - "/delayload:user32", "/pdb:foo", "/pdbaltpath:bar", - "/verbose", "/verbose:icf", "/wx", "/wx:no", "a.obj", - nullptr)); + "/disallowlib:foo", "/delayload:user32", "/pdb:foo", + "/pdbaltpath:bar", "/verbose", "/verbose:icf", "/wx", + "/wx:no", "a.obj", nullptr)); EXPECT_EQ("", errorMessage()); EXPECT_EQ(1, inputFileCount()); EXPECT_EQ("a.obj", inputFile(0));