crates/nornir-build-thing/src/kconfig/minimal.config
# nordisk MINIMAL overlay — the LINKER's knife, merged over whatever preset was
# picked. Third of the three knives (design §3), and the one that does NOT
# remove a feature: `tinyconfig` decides where you START, the minify pass decides
# WHICH FEATURES exist, and this throws away unreachable code INSIDE the features
# that survived.
#
# ── READ THIS BEFORE ADDING A LINE ─────────────────────────────────────────
# MEASURED 2026-08-23, twice, by being refused:
#
# 1. CONFIG_LD_DEAD_CODE_DATA_ELIMINATION does NOT EXIST ON x86_64. It is gated
# on HAVE_LD_DEAD_CODE_DATA_ELIMINATION, and only arm, mips, riscv and
# powerpc select that (grepped in linux-6.12.104/arch/*/Kconfig). The first
# build carrying it was refused by the canary; the second, after adding its
# `depends on EXPERT` parent, was refused again — because the parent was
# never the problem. On x86_64 the linker's knife is clang LTO and nothing
# else, which is why `minimal = true` REFUSES on this arch by name and names
# that alternative.
#
# 2. CONFIG_TRIM_UNUSED_KSYMS is declared in kernel/module/Kconfig — INSIDE
# `if MODULES`. A MODULES=n kernel cannot have it, and every preset this
# overlay would help most (slim, nuked, any hardened build) is MODULES=n.
# The comment that used to sit here argued that MODULES=n is precisely when
# trimming exports pays; that was reasoning about the kernel instead of
# reading it.
#
# So this file is deliberately near-empty. It is kept, rather than deleted,
# because the `minimal` axis is arch-shaped: the moment this kind wires arm64
# (the `arch` axis refuses it today), the DCE line above becomes real there and
# belongs HERE, with its two dependencies already written down.
# EXPERT only UNHIDES options; it turns nothing on by itself, and it is what
# LD_DEAD_CODE_DATA_ELIMINATION depends on wherever that option exists at all.
CONFIG_EXPERT=y