[Mlir-commits] [mlir] [mlir][python][cmake] Allows for specifying `NB_DOMAIN` in `add_mlir_python_extension` (PR #122865)

Maksim Levental llvmlistbot at llvm.org
Wed Jan 15 05:47:45 PST 2025


================
@@ -658,6 +658,13 @@ function(add_mlir_python_extension libname extname)
     set(eh_rtti_enable -frtti -fexceptions)
   endif ()
 
+  # Avoids domain conflict with nanobind by specifying NB_DOMAIN.
+  if(MLIR_BINDINGS_PYTHON_NB_DOMAIN)
+    set(_nb_domain ${MLIR_BINDINGS_PYTHON_NB_DOMAIN})
+  else()
+    set(_nb_domain "mlir")
+  endif()
+
----------------
makslevental wrote:

This isn't really needed anymore right? Can just move `${MLIR_BINDINGS_PYTHON_NB_DOMAIN}` down to the `nanobind_add_module` call site.

https://github.com/llvm/llvm-project/pull/122865


More information about the Mlir-commits mailing list