summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/Workspace/DscBuildData.py
diff options
context:
space:
mode:
authorFeng, Bob C <bob.c.feng@intel.com>2019-07-22 11:09:22 +0800
committerFeng, Bob C <bob.c.feng@intel.com>2019-08-09 23:15:52 +0800
commite8449e1d8e3b40186eb16ff25242397cffb00a63 (patch)
tree91e6fd4742f6cc2b351be2f5bfe02ab1a4ea1b38 /BaseTools/Source/Python/Workspace/DscBuildData.py
parent197ca7febf8668be505ff904f75b97f9e465df82 (diff)
downloadedk2-e8449e1d8e3b40186eb16ff25242397cffb00a63.tar.gz
edk2-e8449e1d8e3b40186eb16ff25242397cffb00a63.tar.bz2
edk2-e8449e1d8e3b40186eb16ff25242397cffb00a63.zip
BaseTools: Decouple AutoGen Objects
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1875 1. Separate the AutoGen.py into 3 small py files. One is for AutoGen base class, one is for WorkspaceAutoGen class and PlatformAutoGen class, and the one for ModuleAutoGen class. 2. Create a new class DataPipe to store the Platform scope settings. Create a new class PlatformInfo to provide the same interface as PlatformAutoGen. PlatformInfo class is initialized by DataPipe instance. Create a new class WorkspaceInfo to provide the same interface as WorkspaceAutoGen. WorkspaceInfo class is initialized by DataPipe instance. 3. Change ModuleAutoGen to depends on DataPipe, PlatformInfo and WorkspaceInfo. Remove the dependency of ModuleAutoGen to PlatformAutoGen. Cc: Liming Gao <liming.gao@intel.com> Cc: Steven Shi <steven.shi@intel.com> Signed-off-by: Bob Feng <bob.c.feng@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Laszlo Ersek <lersek@redhat.com> Acked-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/Workspace/DscBuildData.py')
-rw-r--r--BaseTools/Source/Python/Workspace/DscBuildData.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/Source/Python/Workspace/DscBuildData.py
index fa41e57c4f..383aeaaa15 100644
--- a/BaseTools/Source/Python/Workspace/DscBuildData.py
+++ b/BaseTools/Source/Python/Workspace/DscBuildData.py
@@ -1373,11 +1373,11 @@ class DscBuildData(PlatformBuildClassObject):
self._PCD_TYPE_STRING_[MODEL_PCD_FEATURE_FLAG],
self._PCD_TYPE_STRING_[MODEL_PCD_DYNAMIC],
self._PCD_TYPE_STRING_[MODEL_PCD_DYNAMIC_EX]]:
- self.Pcds[Name, Guid] = copy.deepcopy(PcdInDec)
- self.Pcds[Name, Guid].DefaultValue = NoFiledValues[( Guid, Name)][0]
+ self._Pcds[Name, Guid] = copy.deepcopy(PcdInDec)
+ self._Pcds[Name, Guid].DefaultValue = NoFiledValues[( Guid, Name)][0]
if PcdInDec.Type in [self._PCD_TYPE_STRING_[MODEL_PCD_DYNAMIC],
self._PCD_TYPE_STRING_[MODEL_PCD_DYNAMIC_EX]]:
- self.Pcds[Name, Guid].SkuInfoList = {TAB_DEFAULT:SkuInfoClass(TAB_DEFAULT, self.SkuIds[TAB_DEFAULT][0], '', '', '', '', '', NoFiledValues[( Guid, Name)][0])}
+ self._Pcds[Name, Guid].SkuInfoList = {TAB_DEFAULT:SkuInfoClass(TAB_DEFAULT, self.SkuIds[TAB_DEFAULT][0], '', '', '', '', '', NoFiledValues[( Guid, Name)][0])}
return AllPcds
def OverrideByFdfOverAll(self,AllPcds):
@@ -1419,8 +1419,8 @@ class DscBuildData(PlatformBuildClassObject):
if PcdInDec.Type in [self._PCD_TYPE_STRING_[MODEL_PCD_FIXED_AT_BUILD],
self._PCD_TYPE_STRING_[MODEL_PCD_PATCHABLE_IN_MODULE],
self._PCD_TYPE_STRING_[MODEL_PCD_FEATURE_FLAG]]:
- self.Pcds[Name, Guid] = copy.deepcopy(PcdInDec)
- self.Pcds[Name, Guid].DefaultValue = Value
+ self._Pcds[Name, Guid] = copy.deepcopy(PcdInDec)
+ self._Pcds[Name, Guid].DefaultValue = Value
return AllPcds
def ParsePcdNameStruct(self,NamePart1,NamePart2):