Fangrui Song via llvm-dev
2021-Jan-16 01:59 UTC
[llvm-dev] Can't seem to build libclang_rt.profile
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? > >Thanksninja clang does not build some needed runtime libraries. For -fprofile-arcs, `ninja profile`. To install it, `ninja install-profile`.
ehsan fatehi via llvm-dev
2021-Jan-16 19:26 UTC
[llvm-dev] Can't seem to build libclang_rt.profile
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`. >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210116/58a01df2/attachment.html>