[Mlir-commits] [mlir] e5ba3c6 - [MLIR][Python] Update Nanobind Warnings List for clang-cl on Windows
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Thu Nov 6 12:10:07 PST 2025
Author: Aiden Grossman
Date: 2025-11-06T12:10:04-08:00
New Revision: e5ba3c6cad99eb656545fbacc15bb1f4ef76ac3b
URL: https://github.com/llvm/llvm-project/commit/e5ba3c6cad99eb656545fbacc15bb1f4ef76ac3b
DIFF: https://github.com/llvm/llvm-project/commit/e5ba3c6cad99eb656545fbacc15bb1f4ef76ac3b.diff
LOG: [MLIR][Python] Update Nanobind Warnings List for clang-cl on Windows
We recently moved over to compiling with clang-cl on Windows. This ended
up causing a large increase in warnings, particularly due to how
warnings are handled in nanobind. cd91d0fff9293a904704784c92c28637bfebef45
initially set -Wall -Wextra and -Wpedantic while fixing another issue,
which is probably not what we want to do on third-party code. We also
need to disable -Wmissing-field-initializers to get things clean in this
configuration.
Reviewers: makslevental, jpienaar, rkayaith
Reviewed By: makslevental
Pull Request: https://github.com/llvm/llvm-project/pull/166828
Added:
Modified:
mlir/cmake/modules/AddMLIRPython.cmake
Removed:
################################################################################
diff --git a/mlir/cmake/modules/AddMLIRPython.cmake b/mlir/cmake/modules/AddMLIRPython.cmake
index fa6aec8a603a9..8196e2a2a3321 100644
--- a/mlir/cmake/modules/AddMLIRPython.cmake
+++ b/mlir/cmake/modules/AddMLIRPython.cmake
@@ -791,7 +791,6 @@ function(add_mlir_python_extension libname extname)
get_property(NB_LIBRARY_TARGET_NAME TARGET ${libname} PROPERTY LINK_LIBRARIES)
target_compile_options(${NB_LIBRARY_TARGET_NAME}
PRIVATE
- -Wall -Wextra -Wpedantic
-Wno-c++98-compat-extra-semi
-Wno-cast-qual
-Wno-covered-switch-default
@@ -799,11 +798,11 @@ function(add_mlir_python_extension libname extname)
-Wno-nested-anon-types
-Wno-unused-parameter
-Wno-zero-length-array
+ -Wno-missing-field-initializers
${eh_rtti_enable})
target_compile_options(${libname}
PRIVATE
- -Wall -Wextra -Wpedantic
-Wno-c++98-compat-extra-semi
-Wno-cast-qual
-Wno-covered-switch-default
@@ -811,6 +810,7 @@ function(add_mlir_python_extension libname extname)
-Wno-nested-anon-types
-Wno-unused-parameter
-Wno-zero-length-array
+ -Wno-missing-field-initializers
${eh_rtti_enable})
endif()
More information about the Mlir-commits
mailing list