Do not build webnn with xnnpack (122-based) on yocto

The xnnpack build has own march flags, which are getting
overridden by yocto setup, this ends in broken compilation,
as gn has no clue about override. Therefore, build webnn
without xnnpack on yocto.

Change-Id: I426a452a5608a5da3bc630f8ec3389e0eb313ef4
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
(cherry picked from commit a4ed875ee2)
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
This commit is contained in:
Michal Klocek 2024-07-09 12:01:39 +02:00 committed by Mikko Gronoff
parent dca85f7c91
commit 4874464cf0
2 changed files with 33 additions and 0 deletions

View File

@ -36,5 +36,6 @@ SRC_URI += " \
SRC_URI += " \
file://chromium/0001-v8-qemu-wrapper.patch;patchdir=src/3rdparty \
file://chromium/0002-Remove-the-GN-settings-done-for-clang-that-conflict-.patch;patchdir=src/3rdparty \
file://chromium/0003-Do-not-build-webnn-with-xnnpack.patch;patchdir=src/3rdparty \
"
SRCREV_FORMAT = "qtwebengine_qtwebengine-chromium"

View File

@ -0,0 +1,32 @@
From e7f11f7135104d1b05fb26637502ec3d19e4c2cd Mon Sep 17 00:00:00 2001
From: Michal Klocek <michal.klocek@qt.io>
Date: Wed, 14 Aug 2024 13:40:31 +0200
Subject: [PATCH] Do not build webnn with xnnpack for arm64
Change-Id: Ib23b6da98eddc8319fa79e8c1365b4e67d21086d
---
.../third_party/blink/renderer/modules/ml/webnn/features.gni | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/chromium/third_party/blink/renderer/modules/ml/webnn/features.gni b/chromium/third_party/blink/renderer/modules/ml/webnn/features.gni
index 941740db3e3..50e139dc1af 100644
--- a/chromium/third_party/blink/renderer/modules/ml/webnn/features.gni
+++ b/chromium/third_party/blink/renderer/modules/ml/webnn/features.gni
@@ -3,12 +3,13 @@
# found in the LICENSE file.
import("//build/config/chrome_build.gni")
+import("//build/config/features.gni")
declare_args() {
# This enables building WebNN with XNNPACK. Currently only available for
# Windows, macOS and Linux on x64, x86 and arm64.
build_webnn_with_xnnpack = (is_linux || is_win || is_mac) &&
(current_cpu == "x64" || current_cpu == "x86" ||
- (current_cpu == "arm64" && !is_win))
+ (current_cpu == "arm64" && !is_win && !is_qtwebengine))
# This build flag enables WebNN to access hardware acceleration using TFLite
# via the ModelLoader mojo interface.
--
2.43.2