[llvm-dev] Can't seem to build libclang_rt.profile

Fangrui Song via llvm-dev llvm-dev at lists.llvm.org
Fri Jan 15 17:59:48 PST 2021


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`.


More information about the llvm-dev mailing list