Gentoo Archives: gentoo-user

From: P Levine <plevine457@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Comparatively slow clang startup vs. gcc - reasons?
Date: Wed, 10 Oct 2018 03:29:51
Message-Id: CADX8ZBJm+ahYTj++XV4=mJ4sgYWXmYETbfgNaVdnhnS7iBJuwg@mail.gmail.com
In Reply to: [gentoo-user] Comparatively slow clang startup vs. gcc - reasons? by "Holger Hoffstätte"
On Tue, Oct 9, 2018 at 1:55 PM Holger Hoffstätte
<holger@××××××××××××××××××.com> wrote:
> Can we do something about this? I remember that llvm had optional static > libs, which apparently were removed completely. Is there something > that can be done with linker tricks (better relocation info?) when > building llvm/clang to speed up the .so loading? > > curious, > Holger >
Has anyone tested with -DLLVM_BUILD_LLVM_DYLIB=ON and -DLLVM_LINK_LLVM_DYLIB=ON? It seems to be made to solve this kind of issue. LLVM_BUILD_LLVM_DYLIB: If enabled, the target for building the libLLVM shared library is added. This library contains all of LLVM’s components in a single shared library. Defaults to OFF. This cannot be used in conjunction with BUILD_SHARED_LIBS. Tools will only be linked to the libLLVM shared library if LLVM_LINK_LLVM_DYLIB is also ON. The components in the library can be customised by setting LLVM_DYLIB_COMPONENTS to a list of the desired components. LLVM_LINK_LLVM_DYLIB: If enabled, tools will be linked with the libLLVM shared library. Defaults to OFF. Setting LLVM_LINK_LLVM_DYLIB to ON also sets LLVM_BUILD_LLVM_DYLIB to ON.