BaseTools: Enable component override functionality

https://bugzilla.tianocore.org/show_bug.cgi?id=1449
This patch enable build tools to recognize that
when two given files have the same GUID, file path and ARCH in Dsc,
The later one's definition will be used.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Carsey Jaben <jaben.carsey@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
Feng, Bob C
2019-01-10 17:03:29 +08:00
parent 7217b8796d
commit 5bc96263ea
3 changed files with 25 additions and 11 deletions

View File

@ -1697,6 +1697,11 @@ class DscParser(MetaFileParser):
self._ValueList = [ReplaceMacro(Value, self._Macros, RaiseError=False)
for Value in self._ValueList]
def DisableOverrideComponent(self,module_id):
for ori_id in self._IdMapping:
if self._IdMapping[ori_id] == module_id:
self._RawTable.DisableComponent(ori_id)
_SectionParser = {
MODEL_META_DATA_HEADER : _DefineParser,
MODEL_EFI_SKU_ID : _SkuIdParser,