mirror of
https://github.com/aydencharles/onionHEN.git
synced 2026-10-23 04:12:37 -05:00
A --release build defined both DEBUG and NDEBUG, and SHELL_DEBUG was hardcoded to 1 in defs.h. Every debug branch therefore shipped: the extra checks in libhijacker's containers, and ~50 verbose diagnostic blocks in the ShellUI hooks — the chattiest logging in the project, running inside an injected system process on every boot. DEBUG is now defined only for non-Release configurations, and SHELL_DEBUG follows NDEBUG (override with -DSHELL_DEBUG=1 to keep the verbose blocks in a release build while chasing a report). The symbols that exist only to serve those blocks are guarded alongside them. Also drop the hardcoded -O0. Release only got -O3 because it was appended after it; reordering the flag strings would have silently produced an unoptimised release build. Optimisation now comes from the build type alone. Release shellui.elf is 24% smaller than the Debug one, and smaller than before this change despite the added logging code. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>