[llvm] [bazel] Fix nanobind header build (PR #192627)

Benjamin Kramer via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 17 03:47:07 PDT 2026


https://github.com/d0k created https://github.com/llvm/llvm-project/pull/192627

The build was broken by 3b3ac5a1169722bff1ae0f5f8f27a48cc08c3d02 changing textual_hdrs to hdrs - the copts/features weren't copied over, meaning Nanobind was attempted to be built with exceptions disabled.

>From 45d260218c7608305d263632e3aa81deed8beae2 Mon Sep 17 00:00:00 2001
From: Benjamin Kramer <benny.kra at googlemail.com>
Date: Fri, 17 Apr 2026 12:42:39 +0200
Subject: [PATCH] [bazel] Fix nanobind header build

The build was broken by 3b3ac5a1169722bff1ae0f5f8f27a48cc08c3d02
changing textual_hdrs to hdrs - the copts/features weren't copied over,
meaning Nanobind was attempted to be built with exceptions disabled.
---
 utils/bazel/llvm-project-overlay/mlir/BUILD.bazel | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel b/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
index 6f7b94fdcb509..3a94c3a816103 100644
--- a/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
@@ -1097,6 +1097,8 @@ cc_library(
 cc_library(
     name = "MLIRBindingsPythonNanobindHeaders",
     hdrs = [":MLIRBindingsPythonHeaderFiles"],
+    copts = PYTHON_BINDINGS_COPTS,
+    features = PYTHON_BINDINGS_FEATURES,
     includes = ["include"],
     deps = [
         ":CAPIDebugHeaders",



More information about the llvm-commits mailing list