summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/Workspace
diff options
context:
space:
mode:
authorFeng, Bob C <bob.c.feng@intel.com>2019-03-15 22:59:29 +0800
committerFeng, Bob C <bob.c.feng@intel.com>2019-03-24 16:12:38 +0800
commit2f2c51acfb70efe3dd02022ca09dd853601d8acd (patch)
tree3a45bb1a11141b6d4d33a40f9c35428491e9dee0 /BaseTools/Source/Python/Workspace
parentf293841f9335c4d5d391279b498a0e09f0cc87da (diff)
downloadedk2-2f2c51acfb70efe3dd02022ca09dd853601d8acd.tar.gz
edk2-2f2c51acfb70efe3dd02022ca09dd853601d8acd.tar.bz2
edk2-2f2c51acfb70efe3dd02022ca09dd853601d8acd.zip
BaseTools: Remove the logic SourceOverridePath
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1350 SOURCE_OVERRIDE_PATH is for EDK component INF files. The corresponding logic should be removed. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/Workspace')
-rw-r--r--BaseTools/Source/Python/Workspace/BuildClassObject.py1
-rw-r--r--BaseTools/Source/Python/Workspace/DscBuildData.py19
-rw-r--r--BaseTools/Source/Python/Workspace/InfBuildData.py11
-rw-r--r--BaseTools/Source/Python/Workspace/MetaFileParser.py8
4 files changed, 1 insertions, 38 deletions
diff --git a/BaseTools/Source/Python/Workspace/BuildClassObject.py b/BaseTools/Source/Python/Workspace/BuildClassObject.py
index b82af49236..3213855e70 100644
--- a/BaseTools/Source/Python/Workspace/BuildClassObject.py
+++ b/BaseTools/Source/Python/Workspace/BuildClassObject.py
@@ -413,7 +413,6 @@ class ModuleBuildClassObject(object):
self.PcdIsDriver = ''
self.BinaryModule = ''
self.Shadow = ''
- self.SourceOverridePath = ''
self.CustomMakefile = {}
self.Specification = {}
self.LibraryClass = []
diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/Source/Python/Workspace/DscBuildData.py
index 5e7d7dcd63..58286159db 100644
--- a/BaseTools/Source/Python/Workspace/DscBuildData.py
+++ b/BaseTools/Source/Python/Workspace/DscBuildData.py
@@ -248,7 +248,6 @@ class DscBuildData(PlatformBuildClassObject):
self._Toolchain = Toolchain
self._ToolChainFamily = None
self._Clear()
- self._HandleOverridePath()
self.WorkspaceDir = os.getenv("WORKSPACE") if os.getenv("WORKSPACE") else ""
self.DefaultStores = None
self.SkuIdMgr = SkuClass(self.SkuName, self.SkuIds)
@@ -307,24 +306,6 @@ class DscBuildData(PlatformBuildClassObject):
self._MacroDict = None
self.DefaultStores = None
- ## handle Override Path of Module
- def _HandleOverridePath(self):
- RecordList = self._RawData[MODEL_META_DATA_COMPONENT, self._Arch]
- for Record in RecordList:
- ModuleId = Record[6]
- LineNo = Record[7]
- ModuleFile = PathClass(NormPath(Record[0]), GlobalData.gWorkspace, Arch=self._Arch)
- RecordList = self._RawData[MODEL_META_DATA_COMPONENT_SOURCE_OVERRIDE_PATH, self._Arch, None, ModuleId]
- if RecordList != []:
- SourceOverridePath = mws.join(GlobalData.gWorkspace, NormPath(RecordList[0][0]))
-
- # Check if the source override path exists
- if not os.path.isdir(SourceOverridePath):
- EdkLogger.error('build', FILE_NOT_FOUND, Message='Source override path does not exist:', File=self.MetaFile, ExtraData=SourceOverridePath, Line=LineNo)
-
- # Add to GlobalData Variables
- GlobalData.gOverrideDir[ModuleFile.Key] = SourceOverridePath
-
## Get current effective macros
@property
def _Macros(self):
diff --git a/BaseTools/Source/Python/Workspace/InfBuildData.py b/BaseTools/Source/Python/Workspace/InfBuildData.py
index 6148ab0d30..9fed1198fd 100644
--- a/BaseTools/Source/Python/Workspace/InfBuildData.py
+++ b/BaseTools/Source/Python/Workspace/InfBuildData.py
@@ -100,9 +100,7 @@ class InfBuildData(ModuleBuildClassObject):
TAB_INF_DEFINES_VERSION_STRING : "_Version",
TAB_INF_DEFINES_VERSION : "_Version",
TAB_INF_DEFINES_PCD_IS_DRIVER : "_PcdIsDriver",
- TAB_INF_DEFINES_SHADOW : "_Shadow",
-
- TAB_COMPONENTS_SOURCE_OVERRIDE_PATH : "_SourceOverridePath",
+ TAB_INF_DEFINES_SHADOW : "_Shadow"
}
# regular expression for converting XXX_FLAGS in [nmake] section to new type
@@ -135,10 +133,6 @@ class InfBuildData(ModuleBuildClassObject):
self._Target = Target
self._Toolchain = Toolchain
self._Platform = TAB_COMMON
- if FilePath.Key in GlobalData.gOverrideDir:
- self._SourceOverridePath = GlobalData.gOverrideDir[FilePath.Key]
- else:
- self._SourceOverridePath = None
self._TailComments = None
self._BaseName = None
self._DxsFile = None
@@ -667,9 +661,6 @@ class InfBuildData(ModuleBuildClassObject):
@cached_property
def Includes(self):
RetVal = []
- if self._SourceOverridePath:
- RetVal.append(self._SourceOverridePath)
-
Macros = self._Macros
Macros['PROCESSOR'] = GlobalData.gEdkGlobal.get('PROCESSOR', self._Arch)
RecordList = self._RawData[MODEL_EFI_INCLUDE, self._Arch, self._Platform]
diff --git a/BaseTools/Source/Python/Workspace/MetaFileParser.py b/BaseTools/Source/Python/Workspace/MetaFileParser.py
index e5fb3f5473..519d30013c 100644
--- a/BaseTools/Source/Python/Workspace/MetaFileParser.py
+++ b/BaseTools/Source/Python/Workspace/MetaFileParser.py
@@ -864,7 +864,6 @@ class DscParser(MetaFileParser):
TAB_PCDS_DYNAMIC_EX_HII_NULL.upper() : MODEL_PCD_DYNAMIC_EX_HII,
TAB_PCDS_DYNAMIC_EX_VPD_NULL.upper() : MODEL_PCD_DYNAMIC_EX_VPD,
TAB_COMPONENTS.upper() : MODEL_META_DATA_COMPONENT,
- TAB_COMPONENTS_SOURCE_OVERRIDE_PATH.upper() : MODEL_META_DATA_COMPONENT_SOURCE_OVERRIDE_PATH,
TAB_DSC_DEFINES.upper() : MODEL_META_DATA_HEADER,
TAB_DSC_DEFINES_DEFINE : MODEL_META_DATA_DEFINE,
TAB_DSC_DEFINES_EDKGLOBAL : MODEL_META_DATA_GLOBAL_DEFINE,
@@ -1292,8 +1291,6 @@ class DscParser(MetaFileParser):
self._ValueList[0:len(TokenList)] = TokenList
- def _CompponentSourceOverridePathParser(self):
- self._ValueList[0] = self._CurrentLine
## [BuildOptions] section parser
@ParseMacro
@@ -1368,7 +1365,6 @@ class DscParser(MetaFileParser):
MODEL_PCD_DYNAMIC_EX_HII : self.__ProcessPcd,
MODEL_PCD_DYNAMIC_EX_VPD : self.__ProcessPcd,
MODEL_META_DATA_COMPONENT : self.__ProcessComponent,
- MODEL_META_DATA_COMPONENT_SOURCE_OVERRIDE_PATH : self.__ProcessSourceOverridePath,
MODEL_META_DATA_BUILD_OPTION : self.__ProcessBuildOption,
MODEL_UNKNOWN : self._Skip,
MODEL_META_DATA_USER_EXTENSION : self._SkipUserExtension,
@@ -1703,9 +1699,6 @@ class DscParser(MetaFileParser):
def __ProcessComponent(self):
self._ValueList[0] = ReplaceMacro(self._ValueList[0], self._Macros)
- def __ProcessSourceOverridePath(self):
- self._ValueList[0] = ReplaceMacro(self._ValueList[0], self._Macros)
-
def __ProcessBuildOption(self):
self._ValueList = [ReplaceMacro(Value, self._Macros, RaiseError=False)
for Value in self._ValueList]
@@ -1731,7 +1724,6 @@ class DscParser(MetaFileParser):
MODEL_PCD_DYNAMIC_EX_HII : _PcdParser,
MODEL_PCD_DYNAMIC_EX_VPD : _PcdParser,
MODEL_META_DATA_COMPONENT : _ComponentParser,
- MODEL_META_DATA_COMPONENT_SOURCE_OVERRIDE_PATH : _CompponentSourceOverridePathParser,
MODEL_META_DATA_BUILD_OPTION : _BuildOptionParser,
MODEL_UNKNOWN : MetaFileParser._Skip,
MODEL_META_DATA_USER_EXTENSION : MetaFileParser._SkipUserExtension,