summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py
diff options
context:
space:
mode:
Diffstat (limited to 'BaseTools/Source/Python/AutoGen/PlatformAutoGen.py')
-rw-r--r--BaseTools/Source/Python/AutoGen/PlatformAutoGen.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py b/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py
index c16f2e4cd8..e2ef325677 100644
--- a/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py
@@ -1474,8 +1474,11 @@ class PlatformAutoGen(AutoGen):
if ToolDef[Tool].get(TAB_TOD_DEFINES_BUILDRULEFAMILY, "") != "":
if Family != ToolDef[Tool][TAB_TOD_DEFINES_BUILDRULEFAMILY]:
continue
- elif Family != ToolDef[Tool][TAB_TOD_DEFINES_FAMILY]:
- continue
+ else:
+ if ToolDef[Tool].get(TAB_TOD_DEFINES_FAMILY, "") == "":
+ continue
+ if Family != ToolDef[Tool][TAB_TOD_DEFINES_FAMILY]:
+ continue
FamilyMatch = True
# expand any wildcard
if Target == TAB_STAR or Target == self.BuildTarget:
@@ -1509,6 +1512,8 @@ class PlatformAutoGen(AutoGen):
if Tool not in ToolDef or Family == "":
continue
# option has been added before
+ if TAB_TOD_DEFINES_FAMILY not in ToolDef[Tool]:
+ continue
if Family != ToolDef[Tool][TAB_TOD_DEFINES_FAMILY]:
continue