[compiler-rt] [XRay] Always register constructor(0) alongside .preinit_array (PR #188788)
Sebastian Kreutzer via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 27 06:35:33 PDT 2026
================
@@ -21,6 +21,12 @@
#include <utility>
extern "C" {
+
+// Ensure XRay is initialized. Safe to call multiple times; the first call
+// performs flag parsing, sled registration, and (if requested) pre-main
+// patching. Subsequent calls return immediately.
+extern void __xray_init();
----------------
sebastiankreutzer wrote:
This is already declared in the public interface (which is included here), so unless I'm missing something, this shouldn't be needed.
https://github.com/llvm/llvm-project/pull/188788
More information about the llvm-commits
mailing list