When compiling code like the example and RUSTFLAGS=-Cprofile-generate=$PWD, it fails to link with errors like this:
foo.c:1:(.text._sub_I_00100_0+0xf): undefined reference to `__gcov_init'
(and many other __gcov_* symbols)
That's with a default CC that is GCC; it's okay with Clang because that uses the same profiling library as Rust.
Maybe -Cprofile-generate (and -Cprofile-use) should not be translated for ToolFamily::Gnu at all? It seems unlikely that someone would use this and try to juggle both LLVM profraw and GCC gcov files, even if the link error is fixed.