@@ -23,6 +23,14 @@ menuconfig BR2_PACKAGE_MESA3D
if BR2_PACKAGE_MESA3D
+config BR2_PACKAGE_MESA3D_LLVM
+ bool "mesa3d w/ llvm"
+ depends on BR2_PACKAGE_LLVM_ARCH_SUPPORTS
+ select BR2_PACKAGE_LLVM
+
+comment "mesa3d w/ llvm needs a llvm compiler"
+ depends on !BR2_PACKAGE_LLVM_ARCH_SUPPORTS
+
# inform the .mk file of gallium, dri or vulkan driver selection
config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
bool
@@ -26,6 +26,20 @@ MESA3D_DEPENDENCIES = \
# Disable assembly usage.
MESA3D_CONF_OPTS = --disable-asm
+ifeq ($(BR2_PACKAGE_MESA3D_LLVM),y)
+MESA3D_DEPENDENCIES += host-llvm llvm
+MESA3D_CONF_OPTS += \
+ --with-llvm-prefix=$(STAGING_DIR)/usr \
+ --enable-llvm-shared-libs \
+ --enable-llvm
+else
+# Avoid automatic search of llvm-config
+MESA3D_CONF_OPTS += \
+ --with-llvm-prefix=$(STAGING_DIR)/usr \
+ --disable-llvm-shared-libs \
+ --disable-llvm
+endif
+
# The Sourcery MIPS toolchain has a special (non-upstream) feature to
# have "compact exception handling", which unfortunately breaks with
# mesa3d, so we disable it here by passing -mno-compact-eh.
@@ -213,7 +227,4 @@ else
MESA3D_CONF_OPTS += --disable-lmsensors
endif
-# Avoid automatic search of llvm-config
-MESA3D_CONF_OPTS += --with-llvm-prefix=$(STAGING_DIR)/usr/bin
-
$(eval $(autotools-package))
Signed-off-by: Romain Naour <romain.naour@gmail.com> Cc: Adrian Perez de Castro <aperez@igalia.com> --- package/mesa3d/Config.in | 8 ++++++++ package/mesa3d/mesa3d.mk | 17 ++++++++++++++--- 2 files changed, 22 insertions(+), 3 deletions(-)