Re: [PATCH] Support conditional deps using "depends on X if Y"

From: Randy Dunlap
Date: Mon Nov 10 2025 - 17:43:45 EST




On 11/10/25 1:15 PM, Nathan Chancellor wrote:
> On Mon, Nov 10, 2025 at 10:48:59AM +0200, Jani Nikula wrote:
>> "depends on A || !A" (or A=n) is the most common pattern in Kconfig,
>> which literally means "depends on A if A".
>
> That is totally fair, I did not try to actually search for the idiom. I
> will say I do not find that either expression in Kconfig easily
> translates in my head to "this dependency must be built in if the symbol
> is built in, modular if the symbol is modular, or disabled" but I guess
> that is just lack of familiarity with these idioms. I just want it to be
> obvious to folks writing Kconfig when something like this is appropriate
> to use but I guess with that being the most common usage in the tree, it
> is fine as is.

I haven't tested it but it looks reasonable to me.

> I think my point about tests still stands, at least something very
> basic.

Ack.

--
~Randy