[llvm-branch-commits] [MLIR][Python] Pass -Wno-unused-template to nanobind build (PR #221479)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sat Sep 5 11:46:43 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-mlir

Author: Aiden Grossman (boomanaiden154)

<details>
<summary>Changes</summary>

As with a lot of other warnings, the nanobind build is also not clean
under -Wunused-template. This was enabled by default for clang 23
(although reverted for 23.1.1). Disable it in case it gets enabled again
and also in case anyone enables it manually.


---
Full diff: https://github.com/llvm/llvm-project/pull/221479.diff


1 Files Affected:

- (modified) mlir/cmake/modules/AddMLIRPython.cmake (+2) 


``````````diff
diff --git a/mlir/cmake/modules/AddMLIRPython.cmake b/mlir/cmake/modules/AddMLIRPython.cmake
index 7d47fd0bca34f..1e483116569a0 100644
--- a/mlir/cmake/modules/AddMLIRPython.cmake
+++ b/mlir/cmake/modules/AddMLIRPython.cmake
@@ -385,6 +385,7 @@ function(build_nanobind_lib)
         -Wno-deprecated-literal-operator
         -Wno-nested-anon-types
         -Wno-unused-parameter
+	-Wno-unused-template
         -Wno-zero-length-array
         -Wno-missing-field-initializers
         ${eh_rtti_enable})
@@ -1055,6 +1056,7 @@ function(add_mlir_python_extension libname extname nb_library_target_name)
         -Wno-deprecated-literal-operator
         -Wno-nested-anon-types
         -Wno-unused-parameter
+	-Wno-unused-template
         -Wno-zero-length-array
         -Wno-missing-field-initializers)
   endif()

``````````

</details>


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


More information about the llvm-branch-commits mailing list