From 0bbfe2106a819d543b5377b267a24c7f641a225c Mon Sep 17 00:00:00 2001 From: Joel Winarske Date: Wed, 2 Sep 2026 17:08:59 -0700 Subject: [PATCH] riscv64: do not build wasm-opt, matching what the Yocto recipe does The riscv64 build fails linking wasm-opt with nine duplicate __cxa* symbols, defined both by the vendored libcxxabi and by the target libc++.a that ships with the pinned clang toolchain. upstream flutter/tools/gn already drops that target when it builds the Dart SDK in-tree, with the comment "it doesn't build properly with our gn configuration". The exclusion sits in the is_host_build() branch, which is only host builds, linux arm64 and mac, so a cross build with no prebuilt Dart SDK for its target never reaches it. flutter/prebuilts carries linux-x64 and linux-arm64 only, which is why x86_64 and arm64 build clean: they copy a prebuilt SDK and never build wasm-opt at all. meta-flutter's flutter-engine recipe has passed --gn-args=dart_include_wasm_opt=false since it hit the same wall, and its riscv64 builds work. Do the same here rather than patch tools/gn: the option is upstream and its value is appended after the computed args, so it wins. Nothing in an embedder build wants wasm-opt; it is dart2wasm tooling. Signed-off-by: Joel Winarske --- .github/workflows/flutter-engine-riscv64.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/flutter-engine-riscv64.yaml b/.github/workflows/flutter-engine-riscv64.yaml index 1cd9c1d..24c92c8 100644 --- a/.github/workflows/flutter-engine-riscv64.yaml +++ b/.github/workflows/flutter-engine-riscv64.yaml @@ -107,6 +107,7 @@ jobs: --no-goma --no-rbe \ --no-stripped --no-enable-unittests \ --no-dart-version-git-info \ + --gn-args=dart_include_wasm_opt=false \ --linux-cpu $linux_cpu \ --target-os linux \ --target-sysroot $PWD/build/linux/$target_sysroot \ @@ -156,6 +157,7 @@ jobs: --no-goma --no-rbe \ --no-stripped --no-enable-unittests \ --no-dart-version-git-info \ + --gn-args=dart_include_wasm_opt=false \ --linux-cpu $linux_cpu \ --target-os linux \ --target-sysroot $PWD/build/linux/$target_sysroot \ @@ -205,6 +207,7 @@ jobs: --no-goma --no-rbe \ --no-stripped --no-enable-unittests \ --no-dart-version-git-info \ + --gn-args=dart_include_wasm_opt=false \ --linux-cpu $linux_cpu \ --target-os linux \ --target-sysroot $PWD/build/linux/$target_sysroot \