<div dir="ltr"><div class="gmail_default" style="font-family:'courier new',monospace">Hi,</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_default" style="font-family:'courier new',monospace">This functionality is implemented say incompletely. Now -Bdynamic is not recognized at all. -Bstatic and -Bshareable are aliases for -static and -shared options respectively. The linker uses the last option specified in a command line just to select type of output file.</div></div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_default" style="font-family:'courier new',monospace">Simon</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 17, 2014 at 4:30 PM, Oleg Ranevskyy <span dir="ltr"><<a href="mailto:llvm.mail.list@gmail.com" target="_blank">llvm.mail.list@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
Hello LLD developers!<br>
<br>
Lld is claimed to be compatible with the existing linker options.<br>
However, there is a discrepancy in how the -Bstatic switch (disable
linking against shared libs) is treated by lld and GNU ld.<br>
<br>
According to the GNU ld docs, the switch affects library searching
for -l options <b>which follow it</b>.<br>
This means -Bstatic can be used multiple times in the command line
to disable dynamic linking for particular -l options. For example:<br>
<br>
ld -Bstatic -lslib1 -lslib2 -Bdynamic -ldlib1 -Bstatic -lslib3...<br>
<br>
Even though the GNU linker won't search for so-files for slib1,
slib2 and slib3, so-file for dlib1 will still be considered as it is
preceded by -Bdynamic.<br>
<br>
Lld behaves differently. <br>
-Bdynamic is not recognized yet, whereas -Bstatic applies static
linkage on the binary level, i.e. it's no longer possible to link
against any shared lib. Lld looks for static archives only if
-Bstatic is met in the command line.<br>
<br>
Is this intentional behaviour or this functionality just hasn't been
fully implemented yet?<br>
<br>
Thank you!<br>
<br>
Kind regards,<br>
Oleg<br>
</div>
<br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Simon Atanasyan
</div></div>