[lld] r194114 - [PECOFF] Ignore /disallowlib.

Saleem Abdulrasool compnerd at compnerd.org
Tue Nov 5 19:54:34 PST 2013


On Tue, Nov 5, 2013 at 4:44 PM, Rui Ueyama <ruiu at google.com> wrote:

> Author: ruiu
> Date: Tue Nov  5 18:44:10 2013
> New Revision: 194114
>
> URL: http://llvm.org/viewvc/llvm-project?rev=194114&view=rev
> Log:
> [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.
>

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).


> Modified:
>     lld/trunk/lib/Driver/WinLinkOptions.td
>     lld/trunk/unittests/DriverTests/WinLinkDriverTest.cpp
>
> Modified: lld/trunk/lib/Driver/WinLinkOptions.td
> URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/WinLinkOptions.td?rev=194114&r1=194113&r2=194114&view=diff
>
> ==============================================================================
> --- lld/trunk/lib/Driver/WinLinkOptions.td (original)
> +++ lld/trunk/lib/Driver/WinLinkOptions.td Tue Nov  5 18:44:10 2013
> @@ -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">;
>
> Modified: lld/trunk/unittests/DriverTests/WinLinkDriverTest.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/unittests/DriverTests/WinLinkDriverTest.cpp?rev=194114&r1=194113&r2=194114&view=diff
>
> ==============================================================================
> --- lld/trunk/unittests/DriverTests/WinLinkDriverTest.cpp (original)
> +++ lld/trunk/unittests/DriverTests/WinLinkDriverTest.cpp Tue Nov  5
> 18:44:10 2013
> @@ -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));
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>



-- 
Saleem Abdulrasool
compnerd (at) compnerd (dot) org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131105/6911afd4/attachment.html>


More information about the llvm-commits mailing list