mirror of
https://github.com/cuberite/polarssl.git
synced 2025-09-28 16:03:36 -04:00
Fix recursive dependencies for cross referencing
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
This commit is contained in:
parent
4e10d6c21d
commit
fb06101b9f
@ -387,15 +387,23 @@ defines to be altered. """
|
|||||||
|
|
||||||
def turn_off_dependencies(config_settings):
|
def turn_off_dependencies(config_settings):
|
||||||
"""For every option turned off config_settings, also turn off what depends on it.
|
"""For every option turned off config_settings, also turn off what depends on it.
|
||||||
An option O is turned off if config_settings[O] is False."""
|
|
||||||
|
An option O is turned off if config_settings[O] is False.
|
||||||
|
Handle the dependencies recursively.
|
||||||
|
"""
|
||||||
for key, value in sorted(config_settings.items()):
|
for key, value in sorted(config_settings.items()):
|
||||||
if value is not False:
|
if value is not False:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
# Save the processed settings to handle cross referencies
|
||||||
revdep = set(REVERSE_DEPENDENCIES.get(key, []))
|
revdep = set(REVERSE_DEPENDENCIES.get(key, []))
|
||||||
|
history = set()
|
||||||
while revdep:
|
while revdep:
|
||||||
dep = revdep.pop()
|
dep = revdep.pop()
|
||||||
|
history.add(dep)
|
||||||
config_settings[dep] = False
|
config_settings[dep] = False
|
||||||
revdep.update(REVERSE_DEPENDENCIES.get(dep, []))
|
# Do not add symbols which are already processed
|
||||||
|
revdep.update(set(REVERSE_DEPENDENCIES.get(dep, [])) - history)
|
||||||
|
|
||||||
class BaseDomain: # pylint: disable=too-few-public-methods, unused-argument
|
class BaseDomain: # pylint: disable=too-few-public-methods, unused-argument
|
||||||
"""A base class for all domains."""
|
"""A base class for all domains."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user