Skip to content

Fix Android monolithic build.#60

Closed
meuter wants to merge 1 commit intogoogle:mainfrom
meuter:fix-android-monolithic-build
Closed

Fix Android monolithic build.#60
meuter wants to merge 1 commit intogoogle:mainfrom
meuter:fix-android-monolithic-build

Conversation

@meuter
Copy link
Copy Markdown
Contributor

@meuter meuter commented Apr 5, 2026

Description

The main issue for Android is that the monolithic build was not being linked against system libraries. In particular, liblog used in Log.cpp.

The issue is discussed https://issues.chromium.org/issues/441355989

Changes

The main change is in src/cmake/BundleLibraries.cmake. As suggested on the issue tracker, in the function bundle_libraries we now collect the system dependencies of all the bundled components and propagate that to the monolithic library.

Disclaimer: this was developped with the help of an AI agent. But the result seems reasonable and effective. I did test it using NDK 29 and observed the log messages being properly displayed. This helped me investigate an assertion failiure. Without this fix, I was forced to comment out the call to __android_print_log in Log.cpp which prevented handleAssertionFailure from properly displaying the assertion failure message. With this change I was able to uncomment __android_print_log and get the assertion message.

Happy to adapt it in any way as necessary of course.

EDIT: some typos.

The main issue for Android is that the monolithic build was not linking
against system libraries. In particular, liblog used in Log.cpp.

The issue is discussed https://issues.chromium.org/issues/441355989
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 5, 2026

👋 Thanks for your contribution! Your PR has been imported to Gerrit.
Please visit https://dawn-review.googlesource.com/c/dawn/+/301215 to see it and CC yourself on the change.
After iterating on feedback, please comment on the Gerrit review to notify reviewers.
All reviews are handled within Gerrit, any comments on the GitHub PR may be missed.
You can continue to upload commits to this PR, and they will be automatically imported
into Gerrit.

copybara-service bot pushed a commit that referenced this pull request Apr 8, 2026
The main issue for Android is that the monolithic build was not being
linked against system libraries. In particular, liblog used in Log.cpp.

Changes:

The main change is in `src/cmake/BundleLibraries.cmake`. As suggested on
the issue tracker, in the function `bundle_libraries` we now collect the
system dependencies of all the bundled components and propagate that to
the monolithic library.

**Disclaimer**: this was developed with the help of an AI agent. But the
result seems reasonable and effective. I did test it using NDK 29 and
observed the log messages being properly displayed. This helped me
investigate an assertion failure. Without this fix, I was forced to
comment out the call to `__android_print_log` in `Log.cpp` which
prevented `handleAssertionFailure` from properly displaying the
assertion failure message. With this change I was able to uncomment
`__android_print_log` and get the assertion message.

Happy to adapt it in any way as necessary of course.

This is an imported pull request from
#60

GITHUB_PR_HEAD_SHA=bfaf374f8971f2803f7664b523409925b456c4c0
ORIGINAL_AUTHOR=Cédric Meuter <cedric.meuter@gmail.com>

Bug: 441355989
GitOrigin-RevId: b0e6221
Change-Id: I38e99bc41b96039289cf1dbea1d322e6ee366ccd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/301215
Commit-Queue: James Price <jrprice@google.com>
Reviewed-by: James Price <jrprice@google.com>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 8, 2026

🚀 PR was merged in 96e9e61!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant