[Buildroot] [PATCH 1/6] package/llvm-project: enable clang python bindings

Raphaël Mélotte raphael.melotte at mind.be
Fri Aug 1 15:07:14 UTC 2025


It should be noted that because the python bindings have wrong default
include dirs, they are useless if the includes are not provided
externally.

Signed-off-by: Raphaël Mélotte <raphael.melotte at mind.be>
---
 package/llvm-project/clang/clang.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/package/llvm-project/clang/clang.mk b/package/llvm-project/clang/clang.mk
index a5c8b990aa..1ee0eb323f 100644
--- a/package/llvm-project/clang/clang.mk
+++ b/package/llvm-project/clang/clang.mk
@@ -109,6 +109,10 @@ CLANG_CONF_OPTS += -DLLVM_LINK_LLVM_DYLIB=ON
 HOST_CLANG_CONF_OPTS += -DLLVM_DYLIB_COMPONENTS=all
 CLANG_CONF_OPTS += -DLLVM_DYLIB_COMPONENTS=all
 
+# host-python3 is a permanent dependency of clang, so we can build the
+# python bindings unconditionally:
+HOST_CLANG_CONF_OPTS += -DCLANG_PYTHON_BINDINGS_VERSIONS=$(PYTHON3_VERSION_MAJOR)
+
 # Help host-clang to find our external toolchain, use a relative path from the clang
 # installation directory to the external toolchain installation directory in order to
 # not hardcode the toolchain absolute path.
-- 
2.34.1



More information about the buildroot mailing list