diff mbox series

[meta-arago,scarthgap/master] mesa: enable llvmpipe and pull in meta-clang

Message ID 20241105001029.3716418-1-rs@ti.com
State Accepted
Delegated to: Ryan Eatmon
Headers show
Series [meta-arago,scarthgap/master] mesa: enable llvmpipe and pull in meta-clang | expand

Commit Message

Randolph Sapp Nov. 5, 2024, 12:10 a.m. UTC
From: Randolph Sapp <rs@ti.com>

In the 1 year since I initially enabled llvmpipe for mesa in this layer,
oe-core added their own version of clang and made it easier to enable
for most devices.

Unfortunately, we do not fall under the category of most devices,
considering we allow meta-browser. Meta-browser requires meta-clang,
which provides conflicting versions of clang at runtime. This causes the
mesa GLSL JIT to fail, among other things.

As a result this patch now pulls in meta-clang as a dependency and
configures the default clang provider to be the version provided by
meta-clang.

This reverts commit 90389044489ac8813098e5d6314f568440ff64ec.

Signed-off-by: Randolph Sapp <rs@ti.com>
---
 meta-arago-distro/conf/distro/arago.conf              | 8 ++++----
 meta-arago-distro/conf/distro/include/arago-prefs.inc | 8 ++++++++
 meta-arago-distro/conf/layer.conf                     | 2 +-
 3 files changed, 13 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/meta-arago-distro/conf/distro/arago.conf b/meta-arago-distro/conf/distro/arago.conf
index 5316ce81..8e094e02 100644
--- a/meta-arago-distro/conf/distro/arago.conf
+++ b/meta-arago-distro/conf/distro/arago.conf
@@ -104,10 +104,10 @@  PACKAGECONFIG:pn-vulkan-cts = "${@bb.utils.contains("DISTRO_FEATURES", "wayland"
 
 # Use llvmpipe for better performance with software rendering
 # Only available for armv6+ devices
-#MESA_GALLIUM_LLVM_PACKAGECONFIG = "gallium-llvm"
-#MESA_GALLIUM_LLVM_PACKAGECONFIG:omapl138 = ""
-#PACKAGECONFIG:append:pn-mesa = " ${MESA_GALLIUM_LLVM_PACKAGECONFIG}"
-#PACKAGECONFIG:append:pn-mesa-pvr = " ${MESA_GALLIUM_LLVM_PACKAGECONFIG}"
+MESA_GALLIUM_LLVM_PACKAGECONFIG = "gallium-llvm"
+MESA_GALLIUM_LLVM_PACKAGECONFIG:omapl138 = ""
+PACKAGECONFIG:append:pn-mesa = " ${MESA_GALLIUM_LLVM_PACKAGECONFIG}"
+PACKAGECONFIG:append:pn-mesa-pvr = " ${MESA_GALLIUM_LLVM_PACKAGECONFIG}"
 
 # Enable netperf intervals/pacing and histogram
 PACKAGECONFIG:append:pn-netperf = " intervals histogram"
diff --git a/meta-arago-distro/conf/distro/include/arago-prefs.inc b/meta-arago-distro/conf/distro/include/arago-prefs.inc
index 34c3c539..a518a857 100644
--- a/meta-arago-distro/conf/distro/include/arago-prefs.inc
+++ b/meta-arago-distro/conf/distro/include/arago-prefs.inc
@@ -19,3 +19,11 @@  PREFERRED_PROVIDER_wpa-supplicant = "wpa-supplicant"
 #PREFERRED_PROVIDER_wpa-supplicant:ti33x = "wpa-supplicant-wl18xx"
 #PREFERRED_PROVIDER_wpa-supplicant:ti43x = "wpa-supplicant-wl18xx"
 #PREFERRED_PROVIDER_wpa-supplicant:omap-a15 = "wpa-supplicant-wl18xx"
+
+# Select meta-clang providers
+PREFERRED_PROVIDER_llvm = "clang"
+PREFERRED_PROVIDER_llvm-native = "clang-native"
+PREFERRED_PROVIDER_nativesdk-llvm = "nativesdk-clang"
+PROVIDES:pn-clang = "llvm"
+PROVIDES:pn-clang-native = "llvm-native"
+PROVIDES:pn-nativesdk-clang = "nativesdk-llvm"
diff --git a/meta-arago-distro/conf/layer.conf b/meta-arago-distro/conf/layer.conf
index 04e553b4..00afb5b2 100644
--- a/meta-arago-distro/conf/layer.conf
+++ b/meta-arago-distro/conf/layer.conf
@@ -19,10 +19,10 @@  LAYERDEPENDS_meta-arago-distro = " \
     multimedia-layer \
     meta-python \
     qt5-layer \
+    clang-layer \
     meta-arago-extras \
     meta-arago-test \
 "
-# clang-layer
 
 LAYERRECOMMENDS_meta-arago-distro = " \
     chromium-browser-layer \