<div dir="ltr">
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:11pt">Hello,</span><br></p><p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">XRay has some issues working with C code. <span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">There are two problems I want to mention:<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">1: Getting clang to compile C code with XRay enabled.<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">2: Getting the header interfaces to work with C, so fdr-mode
can be enabled programmatically (in a similar manner to how it can be enabled
for C++)<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">I had to resolve multiple issues before C code would compile
and link correctly. Included below are the steps I had to take to resolve the
problems.<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">Changes I had to make:<br>
Use clang++ instead of clang<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">Use –xc flag to force clang++ to compile the code as C<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">In order to use fdr programmatically, I changed
xray_interface.h and xray_log_interface.h to remove compilation errors by
porting c++ to c.<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">Problem 1<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">==========<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">Would it be possible to make C XRay interface easier to work
with? <span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">The documentation mentions XRay works with
C/C++/Objective-C/Objective-C++ under “Using XRay” (<a href="https://llvm.org/docs/XRay.html" style="color:rgb(5,99,193);text-decoration:underline">https://llvm.org/docs/XRay.html</a>) and
the white paper mentions that “XRay is not specific to a class of applications
and is applicable to any C/C++-based binary -- from storage servers handling
multiple thousands of requests per second to debugging command-line tools and
unit tests”. <span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">I give more detail about the problem below.<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><br>
I am running Ubuntu 16.04.1 on a x86_64 machine and am using clang 7.0.<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">henry@OptiPlex-9010:~$ uname -a<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">Linux OptiPlex-9010 4.13.0-43-generic #48~16.04.1-Ubuntu SMP
Thu May 17 12:56:46 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">Below is a C test file I wrote: (test_pthread.c)<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><br>
==============================<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">#include <stdio.h><span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">#include <pthread.h><span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">__attribute__((xray_always_instrument))<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">void print_parent()<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">{<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span>printf("I
am parent\n");<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">}<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">__attribute__((xray_always_instrument))<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">void* print_child(void* unused)<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">{<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span>printf("I
am child\n");<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span>return
NULL;<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">}<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">int main()<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">{<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span>print_parent();<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span>int
num_threads = 10;<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span>pthread_t
tids[num_threads];<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span>for(int
i = 0; i < num_threads; i++)<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span>{<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span>pthread_create(&tids[i],
NULL, print_child, NULL);<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span>}<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span>for(int
i = 0; i < num_threads; i++)<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span>{<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span>pthread_join(tids[i],
NULL);<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span>}<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span>return
0;<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">}<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">./clang -fxray-instrument test_pthread.c<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">Clang produces errors about c++: (xray_clang_error.txt)<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-instrumented-build/lib/clang/7.0.0/lib/linux/libclang_rt.xray-basic-x86_64.a(xray_basic_logging.cc.o):
In function `__xray::thresholdTicks()':<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:79:
undefined reference to `__cxa_guard_acquire'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:79:
undefined reference to `__cxa_guard_release'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:81:
undefined reference to `__cxa_guard_acquire'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:81:
undefined reference to `__cxa_guard_release'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-instrumented-build/lib/clang/7.0.0/lib/linux/libclang_rt.xray-basic-x86_64.a(xray_basic_logging.cc.o):
In function `__xray::basicLoggingInit(unsigned long, unsigned long, void*,
unsigned long)':<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:423:
undefined reference to `__cxa_guard_acquire'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:423:
undefined reference to `__cxa_guard_release'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:385:
undefined reference to `__cxa_guard_acquire'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:385:
undefined reference to `__cxa_guard_release'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-instrumented-build/lib/clang/7.0.0/lib/linux/libclang_rt.xray-basic-x86_64.a(xray_basic_logging.cc.o):
In function `__xray::getGlobalFd()':<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:113:
undefined reference to `__cxa_guard_acquire'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:113:
undefined reference to `__cxa_guard_release'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-instrumented-build/lib/clang/7.0.0/lib/linux/libclang_rt.xray-basic-x86_64.a(xray_basic_logging.cc.o):
In function `openLogFile':<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:91:
undefined reference to `__cxa_guard_acquire'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:91:
undefined reference to `__cxa_guard_release'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:93:
undefined reference to `__cxa_guard_acquire'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:93:
undefined reference to `__cxa_guard_release'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-instrumented-build/lib/clang/7.0.0/lib/linux/libclang_rt.xray-basic-x86_64.a(xray_basic_logging.cc.o):
In function `operator()':<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:151:
undefined reference to `__cxa_guard_acquire'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:151:
undefined reference to `__cxa_guard_release'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-instrumented-build/lib/clang/7.0.0/lib/linux/libclang_rt.xray-basic-x86_64.a(xray_basic_logging.cc.o):
In function `thresholdTicks':<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:81:
undefined reference to `__cxa_guard_acquire'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:81:
undefined reference to `__cxa_guard_release'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:79:
undefined reference to `__cxa_guard_acquire'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:79:
undefined reference to `__cxa_guard_release'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-instrumented-build/lib/clang/7.0.0/lib/linux/libclang_rt.xray-basic-x86_64.a(xray_basic_logging.cc.o):
In function `__xray::getGlobalFd()':<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:113:
undefined reference to `__cxa_guard_acquire'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:113:
undefined reference to `__cxa_guard_release'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-instrumented-build/lib/clang/7.0.0/lib/linux/libclang_rt.xray-basic-x86_64.a(xray_basic_logging.cc.o):
In function `openLogFile':<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:93:
undefined reference to `__cxa_guard_acquire'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:93:
undefined reference to `__cxa_guard_release'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:91:
undefined reference to `__cxa_guard_acquire'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:91:
undefined reference to `__cxa_guard_release'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-instrumented-build/lib/clang/7.0.0/lib/linux/libclang_rt.xray-basic-x86_64.a(xray_basic_logging.cc.o):
In function `__xray::getGlobalFd()':<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:113:
undefined reference to `__cxa_guard_acquire'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:113:
undefined reference to `__cxa_guard_release'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-instrumented-build/lib/clang/7.0.0/lib/linux/libclang_rt.xray-basic-x86_64.a(xray_basic_logging.cc.o):
In function `openLogFile':<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:93:
undefined reference to `__cxa_guard_acquire'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:93:
undefined reference to `__cxa_guard_release'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:91:
undefined reference to `__cxa_guard_acquire'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:91:
undefined reference to `__cxa_guard_release'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-instrumented-build/lib/clang/7.0.0/lib/linux/libclang_rt.xray-basic-x86_64.a(xray_basic_logging.cc.o):
In function `__xray::getGlobalFd()':<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:113:
undefined reference to `__cxa_guard_acquire'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:113:
undefined reference to `__cxa_guard_release'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:113:
undefined reference to `__cxa_guard_acquire'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:113:
undefined reference to `__cxa_guard_release'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-instrumented-build/lib/clang/7.0.0/lib/linux/libclang_rt.xray-basic-x86_64.a(xray_basic_logging.cc.o):
In function `openLogFile':<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:93:
undefined reference to `__cxa_guard_acquire'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:93:
undefined reference to `__cxa_guard_release'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:91:
undefined reference to `__cxa_guard_acquire'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:91:
undefined reference to `__cxa_guard_release'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:93:
undefined reference to `__cxa_guard_acquire'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:93:
undefined reference to `__cxa_guard_release'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:91:
undefined reference to `__cxa_guard_acquire'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:91:
undefined reference to `__cxa_guard_release'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-instrumented-build/lib/clang/7.0.0/lib/linux/libclang_rt.xray-basic-x86_64.a(xray_basic_logging.cc.o):
In function `__xray::getGlobalFd()':<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:113:
undefined reference to `__cxa_guard_acquire'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:113:
undefined reference to `__cxa_guard_release'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-instrumented-build/lib/clang/7.0.0/lib/linux/libclang_rt.xray-basic-x86_64.a(xray_basic_logging.cc.o):
In function `openLogFile':<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:93:
undefined reference to `__cxa_guard_acquire'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:93:
undefined reference to `__cxa_guard_release'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:91:
undefined reference to `__cxa_guard_acquire'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:91:
undefined reference to `__cxa_guard_release'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-instrumented-build/lib/clang/7.0.0/lib/linux/libclang_rt.xray-basic-x86_64.a(xray_basic_logging.cc.o):
In function `operator()':<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:151:
undefined reference to `__cxa_guard_acquire'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:151:
undefined reference to `__cxa_guard_release'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-instrumented-build/lib/clang/7.0.0/lib/linux/libclang_rt.xray-basic-x86_64.a(xray_basic_logging.cc.o):
In function `thresholdTicks':<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:81:
undefined reference to `__cxa_guard_acquire'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:81:
undefined reference to `__cxa_guard_release'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:79:
undefined reference to `__cxa_guard_acquire'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:79:
undefined reference to `__cxa_guard_release'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-instrumented-build/lib/clang/7.0.0/lib/linux/libclang_rt.xray-basic-x86_64.a(xray_basic_logging.cc.o):
In function `__xray::basicLogDynamicInitializer()':<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:497:
undefined reference to `__cxa_guard_acquire'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:497:
undefined reference to `__cxa_guard_release'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-instrumented-build/lib/clang/7.0.0/lib/linux/libclang_rt.xray-basic-x86_64.a(xray_basic_logging.cc.o):
In function `operator()':<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:494:
undefined reference to `__cxa_guard_acquire'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_basic_logging.cc:494:
undefined reference to `__cxa_guard_release'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-instrumented-build/lib/clang/7.0.0/lib/linux/libclang_rt.xray-fdr-x86_64.a(xray_fdr_logging.cc.o):
In function `__xray::thresholdTicks()':<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_fdr_logging.cc:325:
undefined reference to `__cxa_guard_acquire'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_fdr_logging.cc:325:
undefined reference to `__cxa_guard_release'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_fdr_logging.cc:323:
undefined reference to `__cxa_guard_acquire'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_fdr_logging.cc:323:
undefined reference to `__cxa_guard_release'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-instrumented-build/lib/clang/7.0.0/lib/linux/libclang_rt.xray-fdr-x86_64.a(xray_fdr_logging.cc.o):
In function `__xray::(anonymous namespace)::fdrCommonHeaderInfo()':<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_fdr_logging.cc:688:
undefined reference to `__cxa_guard_acquire'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_fdr_logging.cc:688:
undefined reference to `__cxa_guard_release'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-instrumented-build/lib/clang/7.0.0/lib/linux/libclang_rt.xray-fdr-x86_64.a(xray_fdr_logging.cc.o):
In function `operator()':<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_fdr_logging.cc:680:
undefined reference to `__cxa_guard_acquire'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_fdr_logging.cc:680:
undefined reference to `__cxa_guard_release'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_fdr_logging.cc:678:
undefined reference to `__cxa_guard_acquire'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_fdr_logging.cc:678:
undefined reference to `__cxa_guard_release'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-instrumented-build/lib/clang/7.0.0/lib/linux/libclang_rt.xray-fdr-x86_64.a(xray_fdr_logging.cc.o):
In function `__xray::fdrIterator(XRayBuffer)':<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_fdr_logging.cc:726:
undefined reference to `__cxa_guard_acquire'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_fdr_logging.cc:726:
undefined reference to `__cxa_guard_release'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-instrumented-build/lib/clang/7.0.0/lib/linux/libclang_rt.xray-fdr-x86_64.a(xray_fdr_logging.cc.o):
In function `getTimestamp':<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_fdr_logging.cc:884:
undefined reference to `__cxa_guard_acquire'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_fdr_logging.cc:884:
undefined reference to `__cxa_guard_release'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-instrumented-build/lib/clang/7.0.0/lib/linux/libclang_rt.xray-fdr-x86_64.a(xray_fdr_logging.cc.o):
In function `__xray::fdrLoggingHandleCustomEvent(void*, unsigned long)':<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_fdr_logging.cc:928:
undefined reference to `__cxa_guard_acquire'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_fdr_logging.cc:928:
undefined reference to `__cxa_guard_release'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-instrumented-build/lib/clang/7.0.0/lib/linux/libclang_rt.xray-fdr-x86_64.a(xray_fdr_logging.cc.o):
In function `getTimestamp':<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_fdr_logging.cc:884:
undefined reference to `__cxa_guard_acquire'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_fdr_logging.cc:884:
undefined reference to `__cxa_guard_release'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-instrumented-build/lib/clang/7.0.0/lib/linux/libclang_rt.xray-fdr-x86_64.a(xray_fdr_logging.cc.o):
In function `__xray::fdrLoggingHandleTypedEvent(unsigned short, void const*,
unsigned long)':<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_fdr_logging.cc:978:
undefined reference to `__cxa_guard_acquire'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_fdr_logging.cc:978:
undefined reference to `__cxa_guard_release'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-instrumented-build/lib/clang/7.0.0/lib/linux/libclang_rt.xray-fdr-x86_64.a(xray_fdr_logging.cc.o):
In function `getTimestamp':<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_fdr_logging.cc:884:
undefined reference to `__cxa_guard_acquire'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_fdr_logging.cc:884:
undefined reference to `__cxa_guard_release'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-instrumented-build/lib/clang/7.0.0/lib/linux/libclang_rt.xray-fdr-x86_64.a(xray_fdr_logging.cc.o):
In function `processFunctionHook':<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_fdr_logging.cc:633:
undefined reference to `__cxa_guard_acquire'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_fdr_logging.cc:633:
undefined reference to `__cxa_guard_release'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_fdr_logging.cc:643:
undefined reference to `__cxa_guard_acquire'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_fdr_logging.cc:643:
undefined reference to `__cxa_guard_release'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-instrumented-build/lib/clang/7.0.0/lib/linux/libclang_rt.xray-fdr-x86_64.a(xray_fdr_logging.cc.o):
In function `writeFunctionRecord':<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_fdr_logging.cc:309:
undefined reference to `__cxa_guard_acquire'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_fdr_logging.cc:309:
undefined reference to `__cxa_guard_release'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-instrumented-build/lib/clang/7.0.0/lib/linux/libclang_rt.xray-fdr-x86_64.a(xray_fdr_logging.cc.o):
In function `thresholdTicks':<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_fdr_logging.cc:325:
undefined reference to `__cxa_guard_acquire'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_fdr_logging.cc:325:
undefined reference to `__cxa_guard_release'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_fdr_logging.cc:323:
undefined reference to `__cxa_guard_acquire'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_fdr_logging.cc:323:
undefined reference to `__cxa_guard_release'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-instrumented-build/lib/clang/7.0.0/lib/linux/libclang_rt.xray-fdr-x86_64.a(xray_fdr_logging.cc.o):
In function `writeFunctionRecord':<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_fdr_logging.cc:299:
undefined reference to `__cxa_guard_acquire'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_fdr_logging.cc:299:
undefined reference to `__cxa_guard_release'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-instrumented-build/lib/clang/7.0.0/lib/linux/libclang_rt.xray-fdr-x86_64.a(xray_fdr_logging.cc.o):
In function `getTimestamp':<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_fdr_logging.cc:884:
undefined reference to `__cxa_guard_acquire'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_fdr_logging.cc:884:
undefined reference to `__cxa_guard_release'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-instrumented-build/lib/clang/7.0.0/lib/linux/libclang_rt.xray-fdr-x86_64.a(xray_fdr_logging.cc.o):
In function `processFunctionHook':<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_fdr_logging.cc:633:
undefined reference to `__cxa_guard_acquire'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_fdr_logging.cc:633:
undefined reference to `__cxa_guard_release'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_fdr_logging.cc:643:
undefined reference to `__cxa_guard_acquire'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_fdr_logging.cc:643:
undefined reference to `__cxa_guard_release'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-instrumented-build/lib/clang/7.0.0/lib/linux/libclang_rt.xray-fdr-x86_64.a(xray_fdr_logging.cc.o):
In function `writeFunctionRecord':<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_fdr_logging.cc:309:
undefined reference to `__cxa_guard_acquire'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_fdr_logging.cc:309:
undefined reference to `__cxa_guard_release'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-instrumented-build/lib/clang/7.0.0/lib/linux/libclang_rt.xray-fdr-x86_64.a(xray_fdr_logging.cc.o):
In function `thresholdTicks':<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_fdr_logging.cc:325:
undefined reference to `__cxa_guard_acquire'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_fdr_logging.cc:325:
undefined reference to `__cxa_guard_release'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_fdr_logging.cc:323:
undefined reference to `__cxa_guard_acquire'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_fdr_logging.cc:323:
undefined reference to `__cxa_guard_release'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-instrumented-build/lib/clang/7.0.0/lib/linux/libclang_rt.xray-fdr-x86_64.a(xray_fdr_logging.cc.o):
In function `writeFunctionRecord':<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_fdr_logging.cc:299:
undefined reference to `__cxa_guard_acquire'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_fdr_logging.cc:299:
undefined reference to `__cxa_guard_release'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-instrumented-build/lib/clang/7.0.0/lib/linux/libclang_rt.xray-fdr-x86_64.a(xray_fdr_logging.cc.o):
In function `__xray::fdrLoggingFlush()':<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_fdr_logging.cc:790:
undefined reference to `operator delete(void*)'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-instrumented-build/lib/clang/7.0.0/lib/linux/libclang_rt.xray-fdr-x86_64.a(xray_fdr_logging.cc.o):
In function `__xray::fdrLoggingInit(unsigned long, unsigned long, void*,
unsigned long)':<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_fdr_logging.cc:1096:
undefined reference to `operator delete(void*)'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_fdr_logging.cc:1101:
undefined reference to `operator new(unsigned long)'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_fdr_logging.cc:1106:
undefined reference to `operator delete(void*)'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_fdr_logging.cc:1123:
undefined reference to `__cxa_guard_acquire'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-project/compiler-rt/lib/xray/xray_fdr_logging.cc:1123:
undefined reference to `__cxa_guard_release'<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">clang-7: error: linker command failed with exit code 1 (use
-v to see invocation)<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">Instead, I compiled using clang++ with the –xc flag
mentioned in this post: <a href="http://lists.llvm.org/pipermail/llvm-dev/2018-March/121716.html" style="color:rgb(5,99,193);text-decoration:underline">http://lists.llvm.org/pipermail/llvm-dev/2018-March/121716.html</a><span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">./clang++ -fxray-instrument -xc test_pthread.c<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">It compiles without any errors and the executable works
fine.<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">Problem 2<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">==================================<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">Also, I want to use fdr and want to programmatically
configure fdr to flush its buffers when the program exits, but since the XRay
interface headers are written in c++, clang complains.<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">Here is the file I am trying to compile:
(test_pthread_fdr.c)<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">./clang++ -fxray-instrument -xc test_pthread_fdr.c<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">#include <stdio.h><span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">#include <pthread.h><span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">#include <assert.h><span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">#include "xray/xray_log_interface.h"<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">__attribute__((xray_always_instrument))<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">void print_parent()<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">{<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span>printf("I
am parent\n");<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">}<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">__attribute__((xray_always_instrument))<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">void* print_child(void* unused)<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">{<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span>printf("I
am child\n");<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span>return
NULL;<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">}<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">//code adapted from test case fdr-mode.cc<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">int main()<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">{<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span>assert(__xray_log_select_mode("xray-fdr")
== XRAY_REGISTRATION_OK);<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span>assert(__xray_log_init_mode("xray-fdr",
"buffer_size=16384:buffer_max=10") == XRAY_LOG_INITIALIZED);<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span>__xray_patch();<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span>print_parent();<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span>int
num_threads = 10;<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span>pthread_t
tids[num_threads];<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span>for(int
i = 0; i < num_threads; i++)<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span>{<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span>pthread_create(&tids[i],
NULL, print_child, NULL);<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span>}<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span>for(int
i = 0; i < num_threads; i++)<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span>{<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span>pthread_join(tids[i],
NULL);<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span>}<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span>__xray_log_finalize();<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span>__xray_log_flushLog();<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span><span> </span>__xray_unpatch();<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span>return
0;<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">}<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">I get this error:<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">In file included from test_pthread_fdr.c:5:
(xray_fdr_headers_error.txt)<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">In file included from
/home/henry/build_xray/llvm-instrumented-build/lib/clang/7.0.0/include/xray/xray_log_interface.h:96:<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">/home/henry/build_xray/llvm-instrumented-build/lib/clang/7.0.0/include/xray/xray_interface.h:18:10:
fatal error: 'cstddef' file not found<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">#include <cstddef><span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span>^~~~~~~~~<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">1 error generated.<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">I changed xray_interface.h and xray_log_interface.h by
removing the extern “C”, namespaces and adding typedefs to the structs and
enums to make the headers C compatible. I have included them as in the
attachment.<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">Finally, clang compiles cleanly and the program works fine.<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">Is possible to have XRay interface with C cleanly without
messing with the headers and compiler options? If not, are there easier methods
to make C work with XRay cleanly?<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">Thanks,<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">Henry<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span> </span></p>
<br></div>