BaseTools: Detect the change of env variable used in tooldef.txt

BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1921

Add TOOLS_DEF.ARCH file to all workspace meta files list.
TOOLS_DEF.ARCH include the evaluated Tool definition information
which is filtered by current tool_chain.

With this change, when the environment variable which
is used in ToolDef.txt is changed, build tool will
rebuild the platform.

Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Steven Shi <steven.shi@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
Feng, Bob C 2019-06-27 16:47:36 +08:00
parent 1d06b46cf1
commit 688ec2d006
1 changed files with 5 additions and 2 deletions

View File

@ -794,6 +794,9 @@ class WorkspaceAutoGen(AutoGen):
#
AllWorkSpaceMetaFiles.add(os.path.join(self.BuildDir, 'PcdTokenNumber'))
for Pa in self.AutoGenObjectList:
AllWorkSpaceMetaFiles.add(Pa.ToolDefinitionFile)
for Arch in self.ArchList:
#
# add dec
@ -1861,7 +1864,7 @@ class PlatformAutoGen(AutoGen):
if TAB_TOD_DEFINES_COMMAND_TYPE not in self.Workspace.ToolDef.ToolsDefTxtDatabase:
EdkLogger.error('build', RESOURCE_NOT_AVAILABLE, "No tools found in configuration",
ExtraData="[%s]" % self.MetaFile)
RetVal = {}
RetVal = OrderedDict()
DllPathList = set()
for Def in ToolDefinition:
Target, Tag, Arch, Tool, Attr = Def.split("_")
@ -1875,7 +1878,7 @@ class PlatformAutoGen(AutoGen):
continue
if Tool not in RetVal:
RetVal[Tool] = {}
RetVal[Tool] = OrderedDict()
RetVal[Tool][Attr] = Value
ToolsDef = ''