Skip to content

recovery: Fix build variable quoting and propagation - #36

Merged
YuKongA merged 1 commit into
twrp-16.0from
fix_33
Oct 16, 2026
Merged

YuKongA merged 1 commit into
twrp-16.0from
fix_33

Conversation

@YuKongA

@YuKongA YuKongA commented Oct 13, 2026

Copy link
Copy Markdown
Member

Keep Make variable reads raw and handle strings, scalars and booleans at their consumers.

Share generated C flags across recovery, GUI, minui and MTP, and remove double stringification of string macros. Fix the custom LUN macro mapping and handle unset optional storage paths.

Link libtar statically with recovery to resolve FBE callbacks against the same libvold state. Replace invalid kernel header dependencies and add regression tests.

Fixed #33

Keep Make variable reads raw and handle strings, scalars and booleans
at their consumers.

Share generated C flags across recovery, GUI, minui and MTP, and remove
double stringification of string macros. Fix the custom LUN macro
mapping and handle unset optional storage paths.

Link libtar statically with recovery to resolve FBE callbacks against
the same libvold state. Replace invalid kernel header dependencies and
add regression tests.

Fixed #33
Copilot AI balanced review requested due to automatic review settings October 13, 2026 04:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The cross-layer Make/Soong propagation and static FBE linkage require full-tree build validation.

0 open findings

What changed in this PR

Fixes #33 by preserving raw Make values and converting them according to their consumers.

Changes:

  • Adds typed handling for strings, scalars, booleans, and integers.
  • Shares generated flags across recovery, GUI, minui, and MTP.
  • Statically links libtar and adds regression coverage.
File Description
Android.bp Registers shared flags, tests, and static libtar linkage.
data.cpp Consumes typed macros directly.
gui/​Android.bp Applies shared flags to GUI.
gui/​libtwrpgui_defaults.go Uses typed Make-variable accessors.
libtar/​Android.bp Retains only the static libtar target.
libtar/​libtar_defaults.go Normalizes boolean and policy variables.
mtp/​Android.bp Applies shared flags to MTP.
mtp/​twrp/​TwrpMtpServer.cpp Uses the MTP device string directly.
partition.cpp Uses string macros and handles an unset external path.
prebuilt/​Android.mk Normalizes quoted boolean conditions.
soong/​makevars.go Preserves raw vendor values.
soong/​tests/​test_variables.py Adds end-to-end Make/Go/C++ regressions.
soong/​variables.go Adds typed value and literal conversion helpers.
soong/​variables_test.go Tests conversion edge cases.
twrp.cpp Uses the battery path string directly.
twrp_apex.cpp Uses the APEX file-list string directly.
twrp_defaults_test.go Tests shared flag propagation.
twrp_flags.go Centralizes generated C flags.
twrp_flags_test.go Tests flag generation and compiler semantics.
twrp_recovery_defaults.go Separates reusable flags from recovery defaults.
twrpminui/​Android.bp Applies shared flags to minui.
twrpminui/​events.cpp Removes redundant macro stringification.
twrpminui/​libtwrpminui_defaults.go Uses typed variables and proper kernel headers.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@YuKongA
YuKongA merged commit b924862 into twrp-16.0 Oct 16, 2026
1 check passed
@YuKongA
YuKongA deleted the fix_33 branch October 20, 2026 17:30
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.

Incorrectly stripping double quotes in soong/makevars.go causes build failures

2 participants