On Mon, Oct 12, 2026 at 03:07:10PM -0700, Ian Rogers wrote: > On Sun, Oct 11, 2026 at 4:36 PM Sasha Levin <[email protected]> wrote: > > +# Every optional feature off, so the result does not depend on which > > +# libraries are installed > > +perf-flags-$(CONFIG_TOOLS_BUILD_PERF_MINIMAL) += \ > > + NO_LIBELF=1 NO_LIBTRACEEVENT=1 NO_JEVENTS=1 NO_LIBPYTHON=1 > > NO_LIBDW=1 \ > > + NO_LIBBPF=1 BUILD_BPF_SKEL=0 NO_SLANG=1 NO_GTK2=1 NO_AIO=1 \ > > + NO_BACKTRACE=1 NO_DEMANGLE=1 NO_LZMA=1 NO_LIBZSTD=1 NO_ZLIB=1 \ > > + NO_LIBNUMA=1 NO_LIBUNWIND=1 NO_LIBLLVM=1 NO_CAPSTONE=1 NO_LIBPFM4=1 > > \ > > + NO_SDT=1 NO_JVMTI=1 NO_LIBDEBUGINFOD=1 NO_BABELTRACE2=1 NO_RUST=1 \ > > + NO_SHELLCHECK=1 NO_PERF_READ_VDSO32=1 NO_PERF_READ_VDSOX32=1 > > It seems unfortunate to maintain this list here, we also have a > minimal target as a build test here: > https://web.git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git/tree/tools/perf/tests/make?h=perf-tools-next#n123 > I wonder we should just add support for a MINIMAL=1 variable in > tools/perf/Makefile.config and have that set these other variables.
Yup :( What allmodconfig really wants from perf is what allmodconfig already does for the kernel: build everything the environment supports and skip the rest. A kernel option that needs something the toolchain lacks just ends up off rather than breaking the build. perf has no mode like that I think? A default build fails when libelf, libtraceevent or python is missing, so an arm64 cross build, or a native build without libtraceevent-dev, breaks. Turning everything off was the only way I found around that. Would it make sense to add such a mode to perf instead of MINIMAL=1? A missing library would disable its feature with a warning rather than fail the build, and the mode could skip shellcheck, mypy and pylint too. allmodconfig would then build as much of perf as the host allows. -- Thanks, Sasha

