[llvm-dev] LLD and LLVM_LINK_LLVM_DYLIB

Rui Ueyama via llvm-dev
Fri, 06 Jan 2017 04:44:40 -0000

Hi Hahnfeld,

I just compiled with LLVM_LINK_LLVM_DYLIB enabled [1] and build lld with
`ninja lld`. It built fine. What am I missing?

[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

On Wed, Jan 4, 2017 at 10:31 PM, Hahnfeld, Jonas via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> Hi all,
>
> I recently gave LLD a try and it definitely works fine. However one cannot
> build it together with LLVM_LINK_LLVM_DYLIB:
> ELF/Driver.cpp and ELF/DriverUtils.cpp pull in llvm/Support/CommandLine.h
> which defines the command line options so these global variables end up in
> libLLVM-4.0svn.so via liblldELF.
> If this shared library is then linked into bin/lld or bin/opt one gets
> errors because of "Option '...' registered more than
once" as they are also
> present in the binaries themselves.
>
> Is it possible to keep the global variables for command line options out of
> libLLVM-4.0svn.so?
>
> Regards,
> Jonas
>
> --
> Jonas Hahnfeld, MATSE-Auszubildender
>
> IT Center
> Group: High Performance Computing
> Division: Computational Science and Engineering
> RWTH Aachen University
> Seffenter Weg 23
> D 52074  Aachen (Germany)
> Hahnfeld at itc.rwth-aachen.de
> www.itc.rwth-aachen.de
>
>
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20170106/aa629087/attachment.html>