diff --git a/tools/gyp/pylib/gyp/input.py b/tools/gyp/pylib/gyp/input.py index 354958bfb2ab55..850964eb7dd43d 100644 --- a/tools/gyp/pylib/gyp/input.py +++ b/tools/gyp/pylib/gyp/input.py @@ -1245,19 +1245,22 @@ def ProcessConditionsInDict(the_dict, phase, variables, build_file): # Unhook the conditions list, it's no longer needed. del the_dict[conditions_key] + variables_copy = variables.copy() + for condition in conditions_list: merge_dict = EvalCondition( - condition, conditions_key, phase, variables, build_file + condition, conditions_key, phase, variables_copy, build_file ) if merge_dict is not None: - # Expand variables and nested conditinals in the merge_dict before + # Expand variables and nested conditionals in the merge_dict before # merging it. ProcessVariablesAndConditionsInDict( - merge_dict, phase, variables, build_file + merge_dict, phase, variables_copy, build_file ) MergeDicts(the_dict, merge_dict, build_file, build_file) + LoadAutomaticVariablesFromDict(variables_copy, the_dict) def LoadAutomaticVariablesFromDict(variables, the_dict):