]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: Detect the change of env variable used in tooldef.txt
authorFeng, Bob C <bob.c.feng@intel.com>
Thu, 27 Jun 2019 08:47:36 +0000 (16:47 +0800)
committerFeng, Bob C <bob.c.feng@intel.com>
Wed, 10 Jul 2019 01:29:43 +0000 (09:29 +0800)
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>
BaseTools/Source/Python/AutoGen/AutoGen.py

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