[llvm] [IR2Vec] llvm-ir2vec python bindings scaffolding (PR #176571)
S. VenkataKeerthy via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 20 19:49:21 PST 2026
================
@@ -0,0 +1,14 @@
+find_package(Python COMPONENTS Interpreter Development.Module REQUIRED)
+
+execute_process(
+ COMMAND "${Python_EXECUTABLE}" -m nanobind --cmake_dir
+ OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE nanobind_ROOT
+)
+find_package(nanobind CONFIG REQUIRED)
+
+set_target_properties(LLVMEmbUtils PROPERTIES POSITION_INDEPENDENT_CODE ON)
+
+nanobind_add_module(py_ir2vec MODULE ir2vec_bindings.cpp)
+target_link_libraries(py_ir2vec PRIVATE LLVMEmbUtils)
----------------
svkeerthy wrote:
Just call it `ir2vec` here and other places like `NB_MODULE()` so that the package name is `ir2vec`?
https://github.com/llvm/llvm-project/pull/176571
More information about the llvm-commits
mailing list