From 48efe6b31935cc75fdc6029e76ad358b2cafffe5 Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Wed, 19 Jun 2024 18:29:43 -0400 Subject: [PATCH] xo-pyjit: + llvm_version() --- src/pyjit/pyjit.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pyjit/pyjit.cpp b/src/pyjit/pyjit.cpp index c1706a2c..69e4a4c3 100644 --- a/src/pyjit/pyjit.cpp +++ b/src/pyjit/pyjit.cpp @@ -5,6 +5,7 @@ #include "xo/jit/MachPipeline.hpp" #include "xo/pyutil/pycaller.hpp" #include "xo/pyutil/pyutil.hpp" +#include #include namespace xo { @@ -97,6 +98,9 @@ namespace xo { //pycaller::declare_once(m); //pycaller::declare_once(m); + m.def("llvm_version", []() { return LLVM_VERSION_STRING; }, + py::doc("llvm_version() reports compile-time llvm version string (via [llvm-config.h])")); + py::class_>(m, "MachPipeline") .def_static("make", &MachPipeline::make, py::doc("Create machine pipeline for in-process code generation"