riscv64: do not build wasm-opt, matching what the Yocto recipe does - #26
Merged
Conversation
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 <joel.winarske@linux.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
riscv64 has failed in
Build Debugsince 3.47.1, linkingwasm-optwith nineduplicate
__cxa*symbols defined both by the vendored libcxxabi and by thetarget
libc++.ain the pinned clang toolchain. See #24.upstream
flutter/tools/gnalready drops that target when it builds the Dart SDKin-tree, with the comment "it doesn't build properly with our gn
configuration". The exclusion sits in the
is_host_build()branch -- hostbuilds, linux arm64 and mac -- so a cross build with no prebuilt Dart SDK for its
target never reaches it.
flutter/prebuiltscarrieslinux-x64andlinux-arm64only, which is why x86_64 and arm64 build clean: they copy aprebuilt SDK and never build wasm-opt at all.
meta-flutter's
flutter-enginerecipe has passed--gn-args=dart_include_wasm_opt=falsesince it hit the same wall, and itsriscv64 builds work. Doing the same here is preferable to patching
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. Dropping it
also takes roughly 7000 targets out of the riscv64 build.
Validated on a804b261 from this branch with
release=false(run):
Build Debug,Build ReleaseandBuild Profileall pass, where Debugpreviously died at target 7209 of 14380.
Only the riscv64 workflow is touched. x86_64 and arm64 use a prebuilt SDK, so the
flag would be inert for them.