fix(build): decouple standalone Yocto build from linux_binder_idl toolchain (#635) - #676
Merged
Merged
Conversation
…lchain (#635) The root INTERFACE_TARGET=all build includes linux_binder_idl's CMakeLists.inc, so it requires that toolchain source — which a standalone Yocto recipe (building from a *staged* SDK) doesn't have. Option 2 (per this issue): the Yocto path builds HAL libs PER COMPONENT from the staged SDK (each <module>/<version>/ is self-contained — no CMakeLists.inc); libbinder is built + staged by the separate linux-binder recipe. - Guard the root include: if CMakeLists.inc is absent, fail fast with a clear pointer to the per-component build, instead of a cryptic include() error. Non-regression: in the integrated dev tree the toolchain is present, so the guard passes and the root build is unchanged. - README production-build section: recommend the per-component build for Yocto (was incorrectly recommending the coupled root path), and note the root path is the integrated-dev route. Verified: guard passes when CMakeLists.inc present (dev), FATALs with the per-component pointer when absent. Sibling of #644 (flexible include path).
Contributor
There was a problem hiding this comment.
Pull request overview
Decouples the documented Yocto/BitBake production build from the repo-root (integrated dev) CMake flow that depends on the linux_binder_idl source tree, guiding Yocto consumers to build per-component against a staged SDK.
Changes:
- Update README production-build guidance to recommend per-component builds from
<module>/<version>using a stagedlinux-binderSDK. - Add a root
CMakeLists.txtguard that fails fast with a clear Yocto/per-component build pointer whenCMakeLists.incis missing.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| README.md | Documents the per-component Yocto build as the recommended production path and clarifies root build as integrated-dev only. |
| CMakeLists.txt | Adds an explicit existence check for linux_binder_idl toolchain infrastructure and provides a clearer failure mode. |
…path (#676 review) Copilot review: the CMakeLists.inc include is unconditional, so ANY root build needs the linux_binder_idl toolchain — not just INTERFACE_TARGET=all. Reworded the comment + FATAL_ERROR text accordingly, and quoted the include() path to be safe against spaces/semicolons in HOST_AIDL_DIR.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Closes #635. Sibling of #644 (flexible binder include path).
Problem
The root
CMakeLists.txtdoesinclude(${HOST_AIDL_DIR}/CMakeLists.inc)(line 214) — the linux_binder_idl toolchain infra. So the documented one-shot production build (cmake -S . -DINTERFACE_TARGET=all) requires the linux_binder_idl source tree, which a standalone Yocto recipe building from a staged SDK doesn't have → the "not compactable for Yocto" failure.Fix (option 2: per-component Yocto build)
In Yocto, libbinder is built + staged by the separate
linux-binderrecipe; the HAL libraries are then built per component from the staged SDK — each<module>/<version>/CMakeLists.txtis self-contained (committed C++, noCMakeLists.inc):Both paths are supported — the split is by wrapper:
.sh/ dev uses the integrated root build;.bb/ Yocto uses the per-component build.CMakeLists.incis absent, fail fast pointing to the per-component build instead of a cryptic error. Non-regression — present in the dev tree, so the guard passes and the root build is unchanged.Verified
Guard passes when
CMakeLists.incpresent (dev), FATALs with the per-component pointer when absent. The per-component build itself is already exercised by the #644 flat-layout fake-yocto check.