Skip to content

ci: stop passing TARGET into the build container - #150

Open
Bjordis Collaku (bjordiscollaku) wants to merge 1 commit into
ci/phase4-debsrc-and-privilegedfrom
ci/rename-rules-target-env
Open

Bjordis Collaku (bjordiscollaku) wants to merge 1 commit into
ci/phase4-debsrc-and-privilegedfrom
ci/rename-rules-target-env

Conversation

@bjordiscollaku

@bjordiscollaku Bjordis Collaku (bjordiscollaku) commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Closes #144

build-kernel.yml passed the debian/rules targets into the build container as TARGET. bindgen reads TARGET as a Cargo target triple whenever clang has no explicit --target, so it ran clang with --target=binary. make rustavailable failed on every build, hidden by the || true in debian/rules.d/2-binary-arch.mk, and CONFIG_RUST_IS_AVAILABLE was left unset against a policy of y.

This renames the variable to RULES_TARGETS.

Effect on the kernel. The shipped .config gains exactly one line for qcom and qcom-rt: CONFIG_RUST_IS_AVAILABLE=y. CONFIG_RUST stays off per the qcom annotations, so no Rust code is built.

Validation. Run with the real prepare stage on Ubuntu 26.04 arm64 for both flavours: with TARGET=binary exported, clang reports unknown target triple 'binary'; without it, make rustavailable reports "Rust is available!". The targets handed to debian/rules are identical before and after for every flavours value, and nothing in debian/ or the kernel Makefile reads TARGET. The container script parses with bash -n, and actionlint and zizmor are unchanged from the base.

CI build. run 37965472447, dispatched from this branch for qcom and qcom-rt with debug packages: make rustavailable reports "Rust is available!" for both flavours, with no unknown target triple, the first CI build with Rust available. All 13 packages built and uploaded.

Stacked on #141.

The debian/rules targets were passed into the build container as
TARGET. bindgen reads TARGET as a Cargo target triple whenever clang is
given no explicit --target, so it ran clang with --target=binary and
failed. make rustavailable therefore failed on every build, masked by
the "|| true" in debian/rules.d/2-binary-arch.mk, and
CONFIG_RUST_IS_AVAILABLE was left unset against a policy of y.

Rename the variable to RULES_TARGETS. Nothing in debian/ or the kernel
Makefile reads TARGET, and the targets handed to debian/rules are
unchanged for every flavours value.

Verified with the real prepare stage on Ubuntu 26.04 arm64 for qcom and
qcom-rt: without TARGET exported, make rustavailable reports "Rust is
available!", and the shipped .config differs from today's by exactly
CONFIG_RUST_IS_AVAILABLE=y. CONFIG_RUST stays off per the qcom
annotations, so no Rust code is built.

Closes #144

Signed-off-by: Bjordis Collaku <bcollaku@qti.qualcomm.com>
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