Using Xray compilation with C programs

Hi all,

I was interested in trying out the Xray profiling component in LLVM and was trying to compile a C program with Clang with Xray flags. Unfortunately, I keep getting a linker error everytime I try to compile the C program with Clang. However, the error goes away when I try to compile the same C program with Clang++ with -xc++ flag.

Searching around for this issue, looks like somebody has already filed a bug for this issue:
https://bugs.llvm.org/show_bug.cgi?id=34904

Is there any way to get around this bug or to solve this issue?

Issue description from the filed bug:

Dean - any ideas if this is/should be supported? (I think the last time we discussed this with Kostya the answer was sanitizer-like runtime libraries shouldn’t use any C++ features? (for reasons like this, and others) so maybe this case is another to add to the list of motivations to continue/complete that work?)