diff options
author | Yonghong Zhu <yonghong.zhu@intel.com> | 2016-08-17 13:52:51 +0300 |
---|---|---|
committer | Yonghong Zhu <yonghong.zhu@intel.com> | 2016-08-19 10:39:36 +0300 |
commit | 35dc964bf1eab3f0725389811d2316b1331d6cee (patch) | |
tree | 5022b326489f3fcd7511f15c27f43a4d39c3710f /BaseTools/Source/Python/Workspace/MetaFileTable.py | |
parent | 91ae2988c62f03987fe02159d26b001a5201d812 (diff) | |
download | edk2-35dc964bf1eab3f0725389811d2316b1331d6cee.tar.xz |
BaseTools: Fix a bug use 'COMMON' as CodeBase in BuildOptions section
Current BaseTools query the BuildOptions not cover the case that use
'COMMON' as CodeBase, while DSC spec allow this usage. This Patch add
support for such 'common.DXE_RUNTIME_DRIVER' as the Scope2 in the query
Condition.
Cc: Liming Gao <liming.gao@intel.com>
Cc: Kurt Kennett <Kurt.Kennett@microsoft.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/Workspace/MetaFileTable.py')
-rw-r--r-- | BaseTools/Source/Python/Workspace/MetaFileTable.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/Workspace/MetaFileTable.py b/BaseTools/Source/Python/Workspace/MetaFileTable.py index ab1807046e..aedcacada1 100644 --- a/BaseTools/Source/Python/Workspace/MetaFileTable.py +++ b/BaseTools/Source/Python/Workspace/MetaFileTable.py @@ -341,7 +341,13 @@ class PlatformTable(MetaFileTable): if Scope1 != None and Scope1 != 'COMMON':
ConditionString += " AND (Scope1='%s' OR Scope1='COMMON')" % Scope1
if Scope2 != None and Scope2 != 'COMMON':
- ConditionString += " AND (Scope2='%s' OR Scope2='COMMON' OR Scope2='DEFAULT')" % Scope2
+ # Cover the case that CodeBase is 'COMMON' for BuildOptions section
+ if '.' in Scope2:
+ Index = Scope2.index('.')
+ NewScope = 'COMMON'+ Scope2[Index:]
+ ConditionString += " AND (Scope2='%s' OR Scope2='COMMON' OR Scope2='DEFAULT' OR Scope2='%s')" % (Scope2, NewScope)
+ else:
+ ConditionString += " AND (Scope2='%s' OR Scope2='COMMON' OR Scope2='DEFAULT')" % Scope2
if BelongsToItem != None:
ConditionString += " AND BelongsToItem=%s" % BelongsToItem
|