Loading core/release_config.mk +8 −3 Original line number Diff line number Diff line Loading @@ -119,12 +119,17 @@ define _declare-release-config endef # Include the config map files and populate _flag_declaration_files. # If the file is found more than once, only include it the first time. _flag_declaration_files := _included_config_map_files := $(foreach f, $(config_map_files), \ $(eval FLAG_DECLARATION_FILES:= ) \ $(if $(filter $(_included_config_map_files),$(f)),,\ $(eval _included := $(f)) \ $(eval include $(f)) \ $(eval _flag_declaration_files += $(FLAG_DECLARATION_FILES)) \ $(eval _included_config_map_files += $(f)) \ ) \ ) FLAG_DECLARATION_FILES := Loading core/release_config.scl +20 −1 Original line number Diff line number Diff line Loading @@ -145,6 +145,21 @@ def _format_value(val): else: return val def equal_flag_declaration(flag, other): """Return true if the flag declarations are equal. Args: flag: This flag declaration. other: Another flag declaration. Returns: Whether the declarations are the same. """ for key in "name", "partitions", "default", "appends": if flag[key] != other[key]: return False return True def release_config(all_flags, all_values): """Return the make variables that should be set for this release config. Loading @@ -163,7 +178,11 @@ def release_config(all_flags, all_values): flags_dict = {} for flag in all_flags: if flag["name"] in flag_names: fail(flag["declared_in"] + ": Duplicate declaration of flag " + flag["name"]) if equal_flag_declaration(flag, flags_dict[flag["name"]]): continue else: fail(flag["declared_in"] + ": Duplicate declaration of flag " + flag["name"] + " (declared first in " + flags_dict[flag["name"]]["declared_in"] + ")") flag_names.append(flag["name"]) flags_dict[flag["name"]] = flag Loading Loading
core/release_config.mk +8 −3 Original line number Diff line number Diff line Loading @@ -119,12 +119,17 @@ define _declare-release-config endef # Include the config map files and populate _flag_declaration_files. # If the file is found more than once, only include it the first time. _flag_declaration_files := _included_config_map_files := $(foreach f, $(config_map_files), \ $(eval FLAG_DECLARATION_FILES:= ) \ $(if $(filter $(_included_config_map_files),$(f)),,\ $(eval _included := $(f)) \ $(eval include $(f)) \ $(eval _flag_declaration_files += $(FLAG_DECLARATION_FILES)) \ $(eval _included_config_map_files += $(f)) \ ) \ ) FLAG_DECLARATION_FILES := Loading
core/release_config.scl +20 −1 Original line number Diff line number Diff line Loading @@ -145,6 +145,21 @@ def _format_value(val): else: return val def equal_flag_declaration(flag, other): """Return true if the flag declarations are equal. Args: flag: This flag declaration. other: Another flag declaration. Returns: Whether the declarations are the same. """ for key in "name", "partitions", "default", "appends": if flag[key] != other[key]: return False return True def release_config(all_flags, all_values): """Return the make variables that should be set for this release config. Loading @@ -163,7 +178,11 @@ def release_config(all_flags, all_values): flags_dict = {} for flag in all_flags: if flag["name"] in flag_names: fail(flag["declared_in"] + ": Duplicate declaration of flag " + flag["name"]) if equal_flag_declaration(flag, flags_dict[flag["name"]]): continue else: fail(flag["declared_in"] + ": Duplicate declaration of flag " + flag["name"] + " (declared first in " + flags_dict[flag["name"]]["declared_in"] + ")") flag_names.append(flag["name"]) flags_dict[flag["name"]] = flag Loading