Date: Thu, 6 Nov 2014 09:13:57 -0800 From: Arthur Mesh <amesh@juniper.net> To: <toolchain@freebsd.org> Cc: marcel@freebsd.org Subject: clang and code coverage Message-ID: <20141106171357.GZ15335@juniper.net>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
Folks,
Does FreeBSD's clang support code coverage? It appears to lack necessary run
time libs:
$ uname -a
FreeBSD norse.englab.juniper.net 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r273380M: Tue Oct 21 10:19:02 PDT 2014 root@norse.englab.juniper.net:/usr/obj/usr/src/sys/GENERIC amd64
$ clang -v
FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512
Target: x86_64-unknown-freebsd11.0
Thread model: posix
Selected GCC installation:
$ cat test.c
#include <stdio.h>
int
main (void)
{
int i;
for (i = 1; i < 10; i++)
{
if (i % 3 == 0)
printf ("%d is divisible by 3\n", i);
if (i % 11 == 0)
printf ("%d is divisible by 11\n", i);
}
return 0;
}
$ clang -fprofile-arcs -ftest-coverage cov.c
/usr/bin/ld: /usr/bin/../lib/libprofile_rt.a: No such file: No such file or directory
clang: error: linker command failed with exit code 1 (use -v to see invocation)
FWIW, the same test work on MacOSX 10.10 clang.
Thanks
--
Arthur Mesh <amesh@juniper.net>
Juniper Networks
+1 408 936-4968
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQGcBAEBCAAGBQJUW6xVAAoJEO/ZUtudxDnttRAL/3SAtetBAlu0NwEZeJYQl/6y
Kl6aOQzPSbpbz5eL3kc/Bw2LRWsjlpc4z8qNcFGH3dxI+ce0O0T/XbSqYES1D0YZ
KaYWFhAVqziLBQShrnIuR5QKqwAcTarwaUWDQC1dslmbSVX6PvY8m4HxkCrejVEf
jUyIBGDhjjZhhb8n60EloPhVliiVM50wVIOXPQEc3E77XPvC/OidS8Q1XOaU50oY
DJWoFN64oUYGPmNE3Hu8YEKjLDWrWhzyBI+nxYbQKWJo5trZa4XrFs+ASLGV12cr
E4HlwfAUVLuU8By7vWA27ReAWa8dFZDEuNvdLTvQBs5Kfnz3NH1rxPpE8V/bfYsC
OUGzkpxvfuAnszP8QtspscCpjmyS0R5NYWN6AYR8pL2tdT8EqnuBaKxb8MlccrMc
nor0cJgIBw6Qi2Mp/vLlCNSdR3IcQJ7Iby+o11ZznJnK3LdJ6cC2dbx3XB4sio1Y
7p6dLTaY7Scp9PxJOJ5kLbc7wKsq+upcmIuH0jr+Yg==
=05Vi
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20141106171357.GZ15335>
