[PATCH 0/2] Change Rust Binder crate name to rust_binder

From: Alice Ryhl

Date: Tue Feb 24 2026 - 04:39:39 EST


Currently the crate name of the Rust Binder driver is rust_binder_main,
but I'd like it to be called rust_binder instead. This affects e.g.
symbol names in stack traces.

Thus, introduce a RUST_CRATENAME_stem.o parameter, and set it for Rust
Binder. I tried just using RUSTFLAGS_stem.o and RUSTFLAGS_REMOVE_stem.o,
but RUSTFLAGS_REMOVE_ is incapable of removing the --crate-name
argument. (Even after changing --crate-name to be passed with = instead
of space as the separator to the name.)

Signed-off-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>
---
Alice Ryhl (2):
rust: support overriding crate_name
rust_binder: override crate name to rust_binder

drivers/android/binder/Makefile | 1 +
scripts/Makefile.build | 4 +++-
scripts/generate_rust_analyzer.py | 21 ++++++++++++++++++---
3 files changed, 22 insertions(+), 4 deletions(-)
---
base-commit: 6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f
change-id: 20260224-binder-crate-name-15f14e134fca

Best regards,
--
Alice Ryhl <aliceryhl@xxxxxxxxxx>