[llvm-dev] libcompiler_rt.so and libcompiler_rt.a are not being built

Vedant Kumar via llvm-dev llvm-dev at lists.llvm.org
Fri Dec 16 08:23:38 PST 2016


> On Dec 16, 2016, at 7:06 AM, Dmitry Golovin via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> 
> I want to build LLVM-based toolchain with Musl, I have LLVM sources with clang and lld (under `tools` directory) and libunwind, compiler-rt, libcxx and libcxxabi (under `projects` directory). All are the latest versions cloned from GitHub mirror, branch `master`.
> 
> I'm trying to configure with the following options:
>    CLANG_DEFAULT_CXX_STDLIB = libc++
>    CLANG_DEFAULT_RTLIB = compiler-rt
>    CLANG_DEFAULT_LINKER = lld
>    LLVM_DEFAULT_TARGET_TRIPLE=x86_64-pc-linux-musl 
> 
> I use cmake to configure and ninja to build.
> 
> It configures fine and builds, but I need libcompiler_rt.so and it is not among build targets, so it is not built and installed.
> 
> I think it is a bug and libcompiler_rt.so should be built. I don't have a bugzilla account, so I would appreciate if someone reports it for me.

I don't think a single library that encompasses all of compiler-rt exists, or
even *can* exist. E.g, the runtimes for ASan and TSan both export interceptors
for common library routines which would be mutually incompatible. So, I don't
think this is a bug.

If you want to build all of compiler-rt, try building the phony 'compiler-rt'
target. All of the libraries you need will show up in:

  <build-dir>/lib/clang/<version>/lib


best,
vedant

> 
> Regards,
> Dmitry
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev



More information about the llvm-dev mailing list