feat(cross): support augment libraries in native (local) builds#115
Merged
Conversation
A native `emb cross . --build` (no --target) skipped augment staging entirely, and `--prepare` staged into `targetSysroot` — empty for a native profile, so the install landed in the host `/usr` (needs root). An augment resolved by a CMake config / find_program (e.g. sentry-native under BUILD_CRASH_HANDLER) was therefore unavailable to a native embedder configure. - Build non-host-satisfied augments for native too, into a separate per-workspace overlay prefix (stageInto: null) instead of the sysroot. The existing _separateOverlay wiring adds it as CMAKE_FIND_ROOT_PATH / CMAKE_PREFIX_PATH, so find_package(CONFIG) / find_program resolve it. - --prepare stages the same way for native. - pkgConfigEnv: for a native build (no sysroot) PREPEND the overlay via PKG_CONFIG_PATH rather than REPLACING the search path with PKG_CONFIG_LIBDIR, so the host's system packages (xkbcommon, ...) still resolve alongside the overlay. Signed-off-by: Joel Winarske <joel.winarske@linux.com>
jwinarske
force-pushed
the
jw/native-augment-staging
branch
from
July 12, 2026 01:07
7498924 to
f63e4ed
Compare
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.
Summary
A native build (
emb cross . --build, no--target) couldn't use augment libraries resolved by a CMake config /find_program— most importantly sentry-native underBUILD_CRASH_HANDLER=ON. Two gaps:--buildpath skipped augment staging entirely for native (if (!native …)).--preparestaged intoprofile.targetSysroot, which is empty for a native profile →DESTDIR=/→ the augment installed into the host/usr(Permission deniedwithout root).So a native embedder configure failed at
find_package(sentry)/ crashpad resolution.Changes
stageInto: null) instead of the sysroot. The existing_separateOverlaywiring already exposes that prefix asCMAKE_FIND_ROOT_PATH/CMAKE_PREFIX_PATH, sofind_package(CONFIG)andfind_programresolve it with no extra plumbing.--preparestages the same way.pkgConfigEnv: for a native build (no sysroot) prepend the overlay viaPKG_CONFIG_PATHinstead of replacing the search path withPKG_CONFIG_LIBDIR— otherwise the host's system packages (xkbcommon, …) become invisible and the backend build fails.Host-satisfied augments (found via pkg-config) are still skipped, so this only builds what the host lacks (e.g. sentry-native).
Testing
dart analyzeclean;dart test test/src/cross/*green (incl.overlay_builder_test,cross_builder_test).emb cross . --backend software -D BUILD_CRASH_HANDLER=ON -D INTEGRATION_TEST_CRASH_HANDLER=ON --buildon x86_64 now builds a homescreen with the crash handler — sentry-native staged into the overlay (<overlay>/usr/lib64/cmake/sentry),find_package(sentry)+ crashpadfind_programresolve it, hostxkbcommonstill resolves, binary links (1684 sentry/crashpad symbols).Enables the ivi-homescreen crash-handler CI to build the PR-under-test via
emblocal instead of a pinned workspace checkout.