<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body><div>It builds fine but I cannot execute the resulting binary which aborts with the mentioned error.</div><div>However I don't use LLVM_ENABLE_PROJECTS, I don't know if that changes the way libLLVM-4.0svn.so is linked...</div><div><br></div><div>Cheers,</div><div>Jonas</div><div><br></div><div>Am Freitag, den 06.01.2017, 13:44 +0900 schrieb Rui Ueyama:</div><blockquote type="cite"><div dir="ltr">Hi Hahnfeld,<div><br></div><div>I just compiled with LLVM_LINK_LLVM_DYLIB enabled [1] and build lld with `ninja lld`. It built fine. What am I missing?</div><div><br></div><div>[1] $ cmake -GNinja -DCMAKE_BUILD_TYPE=Debug -DLLVM_ENABLE_THREADS=On -DLLVM_ENABLE_LLD=true -DLLVM_LINK_LLVM_DYLIB=true -DLLVM_ENABLE_PROJECTS='clang;lld' ../llvm-project/llvm<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 4, 2017 at 10:31 PM, Hahnfeld, Jonas via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote type="cite">Hi all,<br>
<br>
I recently gave LLD a try and it definitely works fine. However one cannot<br>
build it together with LLVM_LINK_LLVM_DYLIB:<br>
ELF/Driver.cpp and ELF/DriverUtils.cpp pull in llvm/Support/CommandLine.h<br>
which defines the command line options so these global variables end up in<br>
<a href="http://libLLVM-4.0svn.so" rel="noreferrer" target="_blank">libLLVM-4.0svn.so</a> via liblldELF.<br>
If this shared library is then linked into bin/lld or bin/opt one gets<br>
errors because of "Option '...' registered more than once" as they are also<br>
present in the binaries themselves.<br>
<br>
Is it possible to keep the global variables for command line options out of<br>
<a href="http://libLLVM-4.0svn.so" rel="noreferrer" target="_blank">libLLVM-4.0svn.so</a>?<br>
<br>
Regards,<br>
Jonas<br>
<br>
--<br>
Jonas Hahnfeld, MATSE-Auszubildender<br>
<br>
IT Center<br>
Group: High Performance Computing<br>
Division: Computational Science and Engineering<br>
RWTH Aachen University<br>
Seffenter Weg 23<br>
D 52074 Aachen (Germany)<br>
<a href="mailto:Hahnfeld@itc.rwth-aachen.de">Hahnfeld@itc.rwth-aachen.de</a><br>
<a href="http://www.itc.rwth-aachen.de" rel="noreferrer" target="_blank">www.itc.rwth-aachen.de</a><br>
<br>
<br>
<br>______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br></div>
</blockquote></body></html>