From 96e6d7092c25506e40061b5bc3a2cc2731953b99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20M=C3=A9lotte?= Date: Fri, 1 Aug 2025 15:07:14 +0000 Subject: [PATCH] package/llvm-project: enable clang python bindings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Romain Naour --- 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 2f17a04efc..3e41cb3b13 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.