[compiler-rt] r341445 - [Xray] Darwin providing defined value for weak symbols to fix linkage issue

David Carlier via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 4 22:18:35 PDT 2018


Author: devnexen
Date: Tue Sep  4 22:18:34 2018
New Revision: 341445

URL: http://llvm.org/viewvc/llvm-project?rev=341445&view=rev
Log:
[Xray] Darwin providing defined value for weak symbols to fix linkage issue

- Temporary hack to make the buildbot failure stop on Darwin.

Modified:
    compiler-rt/trunk/lib/xray/xray_init.cc

Modified: compiler-rt/trunk/lib/xray/xray_init.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/xray/xray_init.cc?rev=341445&r1=341444&r2=341445&view=diff
==============================================================================
--- compiler-rt/trunk/lib/xray/xray_init.cc (original)
+++ compiler-rt/trunk/lib/xray/xray_init.cc Tue Sep  4 22:18:34 2018
@@ -27,6 +27,15 @@ extern const XRaySledEntry __start_xray_
 extern const XRaySledEntry __stop_xray_instr_map[] __attribute__((weak));
 extern const XRayFunctionSledIndex __start_xray_fn_idx[] __attribute__((weak));
 extern const XRayFunctionSledIndex __stop_xray_fn_idx[] __attribute__((weak));
+
+#if SANITIZER_MAC
+// HACK: This is a temporary workaround to make XRay build on 
+// Darwin, but it will probably not work at runtime.
+const XRaySledEntry __start_xray_instr_map[] = {};
+extern const XRaySledEntry __stop_xray_instr_map[] = {};
+extern const XRayFunctionSledIndex __start_xray_fn_idx[] = {};
+extern const XRayFunctionSledIndex __stop_xray_fn_idx[] = {};
+#endif
 }
 
 using namespace __xray;




More information about the llvm-commits mailing list