Re: [PATCH] Support conditional deps using "depends on X if Y"
From: Jani Nikula
Date: Mon Nov 10 2025 - 03:49:42 EST
On Sun, 09 Nov 2025, Nathan Chancellor <nathan@xxxxxxxxxx> wrote:
> I think it would be useful to have a slightly more concrete example in
> the documentation of where this could be useful because even with the
> "if" syntax, it still feels a little confusing to me at least with the
> current example. Since this is just internally converting "depends on A
> if B" to "depends on A || !B", this seems like a low risk addition to
> the Kconfig language but it would be good to have some tests under
> scripts/kconfig/tests like the ones recently added by commit
> f9afce4f32e9 ("kconfig: Add transitional symbol attribute for migration
> support") upstream.
"depends on A || !A" (or A=n) is the most common pattern in Kconfig,
which literally means "depends on A if A".
BR,
Jani.
--
Jani Nikula, Intel