Hello,
I am trying to install LLVM through source code using the following commands to get the source coverage of Clang:
$git clone https://github.com/llvm/llvm-project.git
$cd llvm-project
$mkdir build
$cd build
$cmake -DLLVM_ENABLE_PROJECTS=clang -DCMAKE_BUILD_TYPE=Debug -DLLVM_USE_SANITIZER=Address -DLLVM_ENABLE_ASSERTIONS=On -DLLVM_BUILD_INSTRUMENTED_COVERAGE=On ../llvm
$make
When I try to install with make, I get the following error messages:
[ 0%] Generating VCSRevision.h
[ 0%] Building CXX object lib/Demangle/CMakeFiles/LLVMDemangle.dir/Demangle.cpp.o
[ 0%] Building C object lib/Support/BLAKE3/CMakeFiles/LLVMSupportBlake3.dir/blake3.c.o
[ 0%] Building CXX object utils/TableGen/CMakeFiles/obj.LLVMTableGenCommon.dir/Attributes.cpp.o
c++: error: unrecognized command line option â-fprofile-instr-generate=__PATH_TO_llvm-project__/build/profiles/%4m.profrawâ
c++: error: unrecognized command line option â-fprofile-instr-generate=__PATH_TO_llvm-project__/build/profiles/%4m.profrawâ
cc: error: unrecognized command line option â-fprofile-instr-generate=__PATH_TO_llvm-project__/build/profiles/%4m.profrawâ
c++: error: unrecognized command line option â-fcoverage-mappingâ
make[2]: *** [lib/Demangle/CMakeFiles/LLVMDemangle.dir/build.make:76: lib/Demangle/CMakeFiles/LLVMDemangle.dir/Demangle.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:14085: lib/Demangle/CMakeFiles/LLVMDemangle.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
c++: error: unrecognized command line option â-fcoverage-mappingâ
make[2]: *** [utils/TableGen/CMakeFiles/obj.LLVMTableGenCommon.dir/build.make:76: utils/TableGen/CMakeFiles/obj.LLVMTableGenCommon.dir/Attributes.cpp.o] Error 1
[ 0%] Building C object lib/Support/BLAKE3/CMakeFiles/LLVMSupportBlake3.dir/blake3_dispatch.c.o
make[1]: *** [CMakeFiles/Makefile2:14347: utils/TableGen/CMakeFiles/obj.LLVMTableGenCommon.dir/all] Error 2
cc: error: unrecognized command line option â-fcoverage-mappingâ
make[2]: *** [lib/Support/BLAKE3/CMakeFiles/LLVMSupportBlake3.dir/build.make:76: lib/Support/BLAKE3/CMakeFiles/LLVMSupportBlake3.dir/blake3.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
cc: error: unrecognized command line option â-fprofile-instr-generate=__PATH_TO_llvm-project__/build/profiles/%4m.profrawâ
[ 0%] Building C object lib/Support/BLAKE3/CMakeFiles/LLVMSupportBlake3.dir/blake3_portable.c.o
cc: error: unrecognized command line option â-fprofile-instr-generate=__PATH_TO_llvm-project__/build/profiles/%4m.profrawâ
cc: error: unrecognized command line option â-fcoverage-mappingâ
make[2]: *** [lib/Support/BLAKE3/CMakeFiles/LLVMSupportBlake3.dir/build.make:90: lib/Support/BLAKE3/CMakeFiles/LLVMSupportBlake3.dir/blake3_dispatch.c.o] Error 1
cc: error: unrecognized command line option â-fcoverage-mappingâ
make[2]: *** [lib/Support/BLAKE3/CMakeFiles/LLVMSupportBlake3.dir/build.make:104: lib/Support/BLAKE3/CMakeFiles/LLVMSupportBlake3.dir/blake3_portable.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:14242: lib/Support/BLAKE3/CMakeFiles/LLVMSupportBlake3.dir/all] Error 2
[ 0%] Built target llvm_vcsrevision_h
make: *** [Makefile:156: all] Error 2
I can install (compile) LLVM+Clang without â-DLLVM_USE_SANITIZER=Address -DLLVM_ENABLE_ASSERTIONS=On -DLLVM_BUILD_INSTRUMENTED_COVERAGE=Onâ options for cmake. I would greatly appreciate it if anyone could give me an insight into what I am doing wrong.
Thank you!