[llvm-dev] Can't seem to build libclang_rt.profile
ehsan fatehi via llvm-dev
llvm-dev at lists.llvm.org
Sat Jan 16 13:48:31 PST 2021
Thank you! I was totally building it wrong. I need to build llvm and clang
first then feed the llvm-config into compiler-rt
-DLLVM_CONFIG_PATH=/path/to/llvm-config
As explained here: https://compiler-rt.llvm.org/
The initial errors I got led me astray to building this completely wrong.
Thanks again!
On Sat, Jan 16, 2021 at 1:28 PM Fāng-ruì Sòng <maskray at google.com> wrote:
> The -DLLVM_ENABLE_PROJECTS list needs to be `;` separated.
> If the list has `compiler-rt`, you should get a build target called
> `profile` which builds libclang_rt.profile-$arch.a
>
> On Sat, Jan 16, 2021 at 11:27 AM ehsan fatehi via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
> >
> > Hello Fangrui,
> >
> > I'm still not following, if you could help me a bit more. I added ninja
> but seems to not have fixed anything.
> > This is what I did:
> >
> > cmake -DCMAKE_BUILD_TYPE=Release -DBENCHMARK_BUILD_32_BITS:BOOL=1
> -DLLVM_BUILD_INSTRUMENTED=IR
> -DLLVM_ENABLE_PROJECTS=lld,clang,compiler-rt,clang-tools-extra,libclc
> -DLLVM_ENABLE_ZLIB:bool=0 -G Ninja -DCMAKE_INSTALL_PREFIX=../../llvm_32 ../
> >
> > ninja all
> > ninja install
> >
> > It made no difference. I could not find ninja profile and ninja
> install-profile.
> >
> > Thank you so much for your help!
> >
> > Still no library files such as libclang_rt.profile
> >
> >
> > On Fri, Jan 15, 2021 at 7:59 PM Fangrui Song <maskray at google.com> wrote:
> >>
> >> On 2021-01-15, ehsan fatehi via llvm-dev wrote:
> >> >Hello,
> >> >
> >> >
> >> >I'm trying to build LLVM from scratch as I need 32 bit library
> support. I
> >> >am using certain flags ( -fprofile-arc) that require
> libclang_rt.profile,
> >> >specifically libclang_rt.profile-i386.a.
> >> >
> >> >This is the error I encounter:
> >> >ld.lld: error: cannot open
> >> >/llvm_32/lib/clang/10.0.1/lib/linux/libclang_rt.profile-i386.a: No such
> >> >file or directory
> >> >clang-10: error: linker command failed with exit code 1 (use -v to see
> >> >invocation)
> >> >
> >> >
> >> >If you look at the directory of which it complains, there is nothing in
> >> >there
> >> >/nfs/proj/fast/user/efatehi/llvm_32/lib/clang/10.0.1/
> >> >Only file is directory to include, no lib directory whatsoever, meaning
> >> >nothing is being built here..
> >> >
> >> >
> >> >I'm trying with llvm-project-10.0.1
> >> >
> >> >llvm-project-10.0.1.tar.xz
> >> >
> >> >
> >> >Using:
> >> >
> >> >cmake -DCMAKE_BUILD_TYPE=Release -DBENCHMARK_BUILD_32_BITS:BOOL=1
> >> >-DLLVM_BUILD_INSTRUMENTED=IR
> >> >-DLLVM_ENABLE_PROJECTS=lld,clang,compiler-rt,clang-tools-extra,libclc
> >> >-DLLVM_ENABLE_ZLIB:bool=0 -DLLVM_ENABLE_EH=ON -DLLVM_ENABLE_PIC=ON
> >> >-DLLVM_ENABLE_RTTI=ON -DCOMPILER_RT_BUILD_BUILTINS=On
> >> >-DCOMPILER_RT_USE_BUILTINS_LIBRARY=On
> -DCMAKE_INSTALL_PREFIX=../..//llvm_32
> >> >../
> >> >
> >> >Any idea what I am doing wrong here?
> >> >
> >> >Thanks
> >>
> >> ninja clang does not build some needed runtime libraries.
> >> For -fprofile-arcs, `ninja profile`. To install it, `ninja
> install-profile`.
> >
> > _______________________________________________
> > LLVM Developers mailing list
> > llvm-dev at lists.llvm.org
> > https://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/20210116/e5d12000/attachment.html>
More information about the llvm-dev
mailing list