<p><br>
On Nov 5, 2013 8:25 PM, "Rui Ueyama" <<a href="mailto:ruiu@google.com">ruiu@google.com</a>> wrote:<br>
><br>
> On Tue, Nov 5, 2013 at 8:01 PM, Reid Kleckner <<a href="mailto:rnk@google.com">rnk@google.com</a>> wrote:<br>
>><br>
>> On Tue, Nov 5, 2013 at 7:54 PM, Saleem Abdulrasool <<a href="mailto:compnerd@compnerd.org">compnerd@compnerd.org</a>> wrote:<br>
>>><br>
>>> On Tue, Nov 5, 2013 at 4:44 PM, Rui Ueyama <<a href="mailto:ruiu@google.com">ruiu@google.com</a>> wrote:<br>
>>>><br>
>>>> Author: ruiu<br>
>>>> Date: Tue Nov  5 18:44:10 2013<br>
>>>> New Revision: 194114<br>
>>>><br>
>>>> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=194114&view=rev">http://llvm.org/viewvc/llvm-project?rev=194114&view=rev</a><br>
>>>> Log:<br>
>>>> [PECOFF] Ignore /disallowlib.<br>
>>>><br>
>>>> msvcrt.lib contains "/disallowlib" command line option in its .drectve section.<br>
>>>> I couldn't spot any documentation for the option. Ignore it for now so that we<br>
>>>> can link the library without error.<br>
>>><br>
>>><br>
>>> The directive simply indicates that if the library or libraries indicated are specified, silently drop them from the link.  It is used in cases where multiple providers provide the symbol and one is preferred (consider MSVCRT, MSVCRTD, CMT, CMTD).<br>

>><br>
>><br>
>> Sounds like an alias for /nodefaultlib?<br>
>> <a href="http://msdn.microsoft.com/en-us/library/3tz4da4a.aspx">http://msdn.microsoft.com/en-us/library/3tz4da4a.aspx</a><br>
><br>
><br>
> Yeah, it sounds like an alias for /nodefaultlib, making me wonder why there is an alias for that. I'd expect that they are slightly different in semantics.<br>
></p>
<p>Yeah, they have slightly different semantics.  Unlike the nodefaultlib, disallowlib must have a parameter indicating which library to disallow.  Beyond that, AFAIK, they are identical.</p>
<p>My guess is that they have retained it for compatibility with old source code.</p>
<p>>>  <br>
>>><br>
>>>  <br>
>>>><br>
>>>> Modified:<br>
>>>>     lld/trunk/lib/Driver/WinLinkOptions.td<br>
>>>>     lld/trunk/unittests/DriverTests/WinLinkDriverTest.cpp<br>
>>>><br>
>>>> Modified: lld/trunk/lib/Driver/WinLinkOptions.td<br>
>>>> URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/WinLinkOptions.td?rev=194114&r1=194113&r2=194114&view=diff">http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/WinLinkOptions.td?rev=194114&r1=194113&r2=194114&view=diff</a><br>

>>>> ==============================================================================<br>
>>>> --- lld/trunk/lib/Driver/WinLinkOptions.td (original)<br>
>>>> +++ lld/trunk/lib/Driver/WinLinkOptions.td Tue Nov  5 18:44:10 2013<br>
>>>> @@ -92,6 +92,7 @@ def verbose : F<"verbose">;<br>
>>>><br>
>>>>  def delay : QF<"delay">;<br>
>>>>  def delayload : QF<"delayload">;<br>
>>>> +def disallowlib : QF<"disallowlib">;<br>
>>>>  def errorreport : QF<"errorreport">;<br>
>>>>  def pdb : QF<"pdb">;<br>
>>>>  def pdbaltpath : QF<"pdbaltpath">;<br>
>>>><br>
>>>> Modified: lld/trunk/unittests/DriverTests/WinLinkDriverTest.cpp<br>
>>>> URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/unittests/DriverTests/WinLinkDriverTest.cpp?rev=194114&r1=194113&r2=194114&view=diff">http://llvm.org/viewvc/llvm-project/lld/trunk/unittests/DriverTests/WinLinkDriverTest.cpp?rev=194114&r1=194113&r2=194114&view=diff</a><br>

>>>> ==============================================================================<br>
>>>> --- lld/trunk/unittests/DriverTests/WinLinkDriverTest.cpp (original)<br>
>>>> +++ lld/trunk/unittests/DriverTests/WinLinkDriverTest.cpp Tue Nov  5 18:44:10 2013<br>
>>>> @@ -463,9 +463,9 @@ TEST_F(WinLinkParserTest, Ignore) {<br>
>>>>    // compatibility with link.exe.<br>
>>>>    EXPECT_TRUE(parse("link.exe", "/nologo", "/errorreport:prompt",<br>
>>>>                      "/incremental", "/incremental:no", "/delay:unload",<br>
>>>> -                    "/delayload:user32", "/pdb:foo", "/pdbaltpath:bar",<br>
>>>> -                    "/verbose", "/verbose:icf", "/wx", "/wx:no", "a.obj",<br>
>>>> -                    nullptr));<br>
>>>> +                    "/disallowlib:foo", "/delayload:user32", "/pdb:foo",<br>
>>>> +                    "/pdbaltpath:bar", "/verbose", "/verbose:icf", "/wx",<br>
>>>> +                    "/wx:no", "a.obj", nullptr));<br>
>>>>    EXPECT_EQ("", errorMessage());<br>
>>>>    EXPECT_EQ(1, inputFileCount());<br>
>>>>    EXPECT_EQ("a.obj", inputFile(0));<br>
>>>><br>
>>>><br>
>>>> _______________________________________________<br>
>>>> llvm-commits mailing list<br>
>>>> <a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
>>>> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
>>><br>
>>><br>
>>><br>
>>><br>
>>> -- <br>
>>> Saleem Abdulrasool<br>
>>> compnerd (at) compnerd (dot) org<br>
>>><br>
>>> _______________________________________________<br>
>>> llvm-commits mailing list<br>
>>> <a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
>>> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
>>><br>
>><br>
><br>
</p>