How to enable coverage option in the latest drop of clang/llvm

Sinha, Prokash psinha at panasas.com
Mon Sep 8 15:26:13 UTC 2014


Can someone please enlighten me on this…

__ The freebsd10 stable does not have the —coverage option working.  Whereas mac X with Xcode handles this as per my experiment.

__ So I should have some flags or something from the configure options that I can use to have this enabled.

If not, then please help me understand this.

Thanks
-prokash

From: <Sinha>, Prokash Sinha <psinha at panasas.com<mailto:psinha at panasas.com>>
Date: Sunday, September 7, 2014 7:30 AM
To: "freebsd-toolchain at freebsd.org<mailto:freebsd-toolchain at freebsd.org>" <freebsd-toolchain at freebsd.org<mailto:freebsd-toolchain at freebsd.org>>
Subject: How to enable coverage option in the latest drop of clang/llvm



Hi All,

Initially I was having problem compiling clang/llvm, then found some of the compilation error.

Now I can build it on freebsd 10.

But I need to have the coverage option on.  On Mac it is still there -

bash$ clang --coverage main.c  -###
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin12.5.0
Thread model: posix
 "/usr/bin/clang" "-cc1" "-triple" "x86_64-apple-macosx10.8.0" "-emit-obj" "-mrelax-all" "-disable-free" "-disable-llvm-verifier" "-main-file-name" "main.c" "-mrelocation-model" "pic" "-pic-level" "2" "-mdisable-fp-elim" "-masm-verbose" "-munwind-tables" "-target-cpu" "core2" "-target-linker-version" "236.3" "-femit-coverage-notes" "-femit-coverage-data" "-resource-dir" "/usr/bin/../lib/clang/5.1" "-fdebug-compilation-dir" "/fs/home/psinha/mystuff/pgms" "-ferror-limit" "19" "-fmessage-length" "80" "-stack-protector" "1" "-mstackrealign" "-fblocks" "-fobjc-runtime=macosx-10.8.0" "-fencode-extended-block-signature" "-fdiagnostics-show-option" "-fcolor-diagnostics" "-vectorize-slp" "-o" "/var/folders/65/gpz82csd1_s358m49000073r0001ry/T/main-746665.o" "-x" "c" "main.c"
 "/usr/bin/ld" "-demangle" "-dynamic" "-arch" "x86_64" "-macosx_version_min" "10.8.0" "-o" "a.out" "/var/folders/65/gpz82csd1_s358m49000073r0001ry/T/main-746665.o" "/usr/bin/../lib/clang/5.1/lib/darwin/libclang_rt.profile_osx.a" "-lSystem" "/usr/bin/../lib/clang/5.1/lib/darwin/libclang_rt.osx.a"

Thanks,
prokash


More information about the freebsd-toolchain mailing list