paulgazz / kmax

A collection of analysis tools for Kconfig and Kbuild constraints.
42 stars 21 forks source link

Use constraint solving to pick the best default value from Kconfig #214

Open paulgazz opened 2 years ago

paulgazz commented 2 years ago

Some configuration options have multiple default values, with constraints determining when they apply. Instead of picking an arbitrary one as described in #213, check the constraints against the the repaired config file to pick a default value. Usually, there is a "default" default, that is the last in the is list of defaults is unconstrained, though this is not strictly enforced, so ultimately some options will still end up with the built-in default, e.g., 0 for int.