Ravi David via llvm-dev
2017-Aug-30 18:19 UTC
[llvm-dev] LLVM code coverage build problem - LLVM_BUILD_INSTRUMENTED_COVERAGE
Hi , I am trying to build LLVM instrumented compiler for code coverage . When I attempted to build the compiler using "-DLLVM_BUILD_INSTRUMENTED_COVERAGE=ON", I end up in the below compiler flag problem. Please let me know, if you have any info related to this problem or if I have missed anything cmake -DCMAKE_C_COMPILER=/usr/64bit/bin/gcc \ -DCMAKE_CXX_COMPILER=/usr/64bit /bin/g++ \ -DCMAKE_BUILD_TYPE=Release \ -DLLVM_TARGETS_TO_BUILD="X86" \ -DLLVM_BUILD_INSTRUMENTED_COVERAGE=ON file /usr/64bit/bin/gcc /usr//usr/64bit/bin/bin/gcc: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), not stripped /usr/64bit/bin/gcc -v gcc version 4.9.4 (GCC) Problem like below [ 0%] Building CXX object utils/PerfectShuffle/CMakeFiles/llvm-PerfectShuffle.dir/PerfectShuffle.cpp.o gcc: error: unrecognized command line option ?-fprofile-instr-generate=%4m.profraw? gcc: error: unrecognized command line option ?-fcoverage-mapping? make[2]: *** [utils/count/CMakeFiles/count.dir/build.make:63: utils/count/CMakeFiles/count.dir/count.c.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:5589: utils/count/CMakeFiles/count.dir/all] Error 2 Thanks, Ravi -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170830/fa2eb187/attachment.html>
Friedman, Eli via llvm-dev
2017-Aug-30 18:29 UTC
[llvm-dev] LLVM code coverage build problem - LLVM_BUILD_INSTRUMENTED_COVERAGE
On 8/30/2017 11:19 AM, Ravi David via llvm-dev wrote:> [ 0%] Building CXX object > utils/PerfectShuffle/CMakeFiles/llvm-PerfectShuffle.dir/PerfectShuffle.cpp.o > > gcc: error: unrecognized command line option > ?-fprofile-instr-generate=%4m.profraw? > > gcc: error: unrecognized command line option ?-fcoverage-mapping? >gcc doesn't support -fprofile-instr-generate; if you want to use it, you have to compile LLVM with clang. (See https://clang.llvm.org/docs/SourceBasedCodeCoverage.html .) If you want to use gcov/lcov, you can use "CXXFLAGS=--coverage" or something like that. -Eli -- Employee of Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170830/14215b92/attachment.html>