Skip to content

fix(build): decouple standalone Yocto build from linux_binder_idl toolchain (#635) - #676

Merged
Ulrond merged 2 commits into
developfrom
feature/635-decouple-yocto-build
Jul 5, 2026
Merged

fix(build): decouple standalone Yocto build from linux_binder_idl toolchain (#635)#676
Ulrond merged 2 commits into
developfrom
feature/635-decouple-yocto-build

Conversation

@Ulrond

@Ulrond Ulrond commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Closes #635. Sibling of #644 (flexible binder include path).

Problem

The root CMakeLists.txt does include(${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-binder recipe; the HAL libraries are then built per component from the staged SDK — each <module>/<version>/CMakeLists.txt is self-contained (committed C++, no CMakeLists.inc):

cmake -S <module>/<version> -B build \
      -DBINDER_SDK_DIR=${STAGING_DIR}/usr -DBINDER_SDK_INCLUDE_DIR=${STAGING_DIR}/usr
cmake --build build && cmake --install build

Both paths are supported — the split is by wrapper: .sh / dev uses the integrated root build; .bb / Yocto uses the per-component build.

  • Guard the root include: if CMakeLists.inc is 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.
  • README: production-build section now recommends the per-component Yocto build (was recommending the coupled root path) and marks the root path as integrated-dev only.

Verified

Guard passes when CMakeLists.inc present (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.

…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).
Copilot AI review requested due to automatic review settings July 3, 2026 12:16
@github-project-automation github-project-automation Bot moved this to Architecture Review Required in halif_aidl Jul 3, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 staged linux-binder SDK.
  • Add a root CMakeLists.txt guard that fails fast with a clear Yocto/per-component build pointer when CMakeLists.inc is 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.

Comment thread CMakeLists.txt Outdated
Comment thread CMakeLists.txt Outdated
Comment thread CMakeLists.txt Outdated
@Ulrond Ulrond self-assigned this Jul 3, 2026
@Ulrond Ulrond added this to the Next Release milestone Jul 3, 2026
@Ulrond Ulrond moved this from Architecture Review Required to Under Review in halif_aidl Jul 4, 2026
@Ulrond Ulrond added Minor Change Additive, backwards-compatible interface change — bumps minor; the default for real work scope:infrastructure Repo tooling, CI/CD, scripts, governance docs labels Jul 4, 2026
…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.
@Ulrond
Ulrond merged commit f96a774 into develop Jul 5, 2026
4 checks passed
@Ulrond
Ulrond deleted the feature/635-decouple-yocto-build branch July 5, 2026 08:30
@github-project-automation github-project-automation Bot moved this from Under Review to Resolved in halif_aidl Jul 5, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 5, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Minor Change Additive, backwards-compatible interface change — bumps minor; the default for real work scope:infrastructure Repo tooling, CI/CD, scripts, governance docs

Projects

Status: Resolved

Development

Successfully merging this pull request may close these issues.

CMakeList not compactable for yocto build

2 participants