* [Patch 1/1] BaseTools: Detect the change of env variable used in tooldef.txt
@ 2019-06-28 3:32 Bob Feng
2019-07-09 2:56 ` Liming Gao
2019-07-10 10:45 ` [edk2-devel] " Philippe Mathieu-Daudé
0 siblings, 2 replies; 3+ messages in thread
From: Bob Feng @ 2019-06-28 3:32 UTC (permalink / raw)
To: devel; +Cc: Bob Feng, Liming Gao, Michael D Kinney, Steven Shi
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>
---
BaseTools/Source/Python/AutoGen/AutoGen.py | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py
index e8e09dc8a366..24592593c868 100644
--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
@@ -792,10 +792,13 @@ class WorkspaceAutoGen(AutoGen):
# add PcdToken Number file for Dynamic/DynamicEx Pcd
#
AllWorkSpaceMetaFiles.add(os.path.join(self.BuildDir, 'PcdTokenNumber'))
+ for Pa in self.AutoGenObjectList:
+ AllWorkSpaceMetaFiles.add(Pa.ToolDefinitionFile)
+
for Arch in self.ArchList:
#
# add dec
#
for Package in PlatformAutoGen(self, self.MetaFile, Target, Toolchain, Arch).PackageList:
@@ -1859,11 +1862,11 @@ class PlatformAutoGen(AutoGen):
def ToolDefinition(self):
ToolDefinition = self.Workspace.ToolDef.ToolsDefTxtDictionary
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("_")
if Target != self.BuildTarget or Tag != self.ToolChain or Arch != self.Arch:
continue
@@ -1873,11 +1876,11 @@ class PlatformAutoGen(AutoGen):
if Attr == "DLL":
DllPathList.add(Value)
continue
if Tool not in RetVal:
- RetVal[Tool] = {}
+ RetVal[Tool] = OrderedDict()
RetVal[Tool][Attr] = Value
ToolsDef = ''
if GlobalData.gOptions.SilentMode and "MAKE" in RetVal:
if "FLAGS" not in RetVal["MAKE"]:
--
2.20.1.windows.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Patch 1/1] BaseTools: Detect the change of env variable used in tooldef.txt
2019-06-28 3:32 [Patch 1/1] BaseTools: Detect the change of env variable used in tooldef.txt Bob Feng
@ 2019-07-09 2:56 ` Liming Gao
2019-07-10 10:45 ` [edk2-devel] " Philippe Mathieu-Daudé
1 sibling, 0 replies; 3+ messages in thread
From: Liming Gao @ 2019-07-09 2:56 UTC (permalink / raw)
To: Feng, Bob C, devel@edk2.groups.io; +Cc: Kinney, Michael D, Shi, Steven
Reviewed-by: Liming Gao <liming.gao@intel.com>
>-----Original Message-----
>From: Feng, Bob C
>Sent: Friday, June 28, 2019 11:32 AM
>To: devel@edk2.groups.io
>Cc: Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming
><liming.gao@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>;
>Shi, Steven <steven.shi@intel.com>
>Subject: [Patch 1/1] 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>
>---
> BaseTools/Source/Python/AutoGen/AutoGen.py | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
>diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py
>b/BaseTools/Source/Python/AutoGen/AutoGen.py
>index e8e09dc8a366..24592593c868 100644
>--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
>+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
>@@ -792,10 +792,13 @@ class WorkspaceAutoGen(AutoGen):
>
> # add PcdToken Number file for Dynamic/DynamicEx Pcd
> #
> AllWorkSpaceMetaFiles.add(os.path.join(self.BuildDir,
>'PcdTokenNumber'))
>
>+ for Pa in self.AutoGenObjectList:
>+ AllWorkSpaceMetaFiles.add(Pa.ToolDefinitionFile)
>+
> for Arch in self.ArchList:
> #
> # add dec
> #
> for Package in PlatformAutoGen(self, self.MetaFile, Target, Toolchain,
>Arch).PackageList:
>@@ -1859,11 +1862,11 @@ class PlatformAutoGen(AutoGen):
> def ToolDefinition(self):
> ToolDefinition = self.Workspace.ToolDef.ToolsDefTxtDictionary
> 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("_")
> if Target != self.BuildTarget or Tag != self.ToolChain or Arch != self.Arch:
> continue
>@@ -1873,11 +1876,11 @@ class PlatformAutoGen(AutoGen):
> if Attr == "DLL":
> DllPathList.add(Value)
> continue
>
> if Tool not in RetVal:
>- RetVal[Tool] = {}
>+ RetVal[Tool] = OrderedDict()
> RetVal[Tool][Attr] = Value
>
> ToolsDef = ''
> if GlobalData.gOptions.SilentMode and "MAKE" in RetVal:
> if "FLAGS" not in RetVal["MAKE"]:
>--
>2.20.1.windows.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [edk2-devel] [Patch 1/1] BaseTools: Detect the change of env variable used in tooldef.txt
2019-06-28 3:32 [Patch 1/1] BaseTools: Detect the change of env variable used in tooldef.txt Bob Feng
2019-07-09 2:56 ` Liming Gao
@ 2019-07-10 10:45 ` Philippe Mathieu-Daudé
1 sibling, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-07-10 10:45 UTC (permalink / raw)
To: devel, bob.c.feng; +Cc: Liming Gao, Michael D Kinney, Steven Shi
On 6/28/19 5:32 AM, Bob Feng wrote:
> 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>
> ---
> BaseTools/Source/Python/AutoGen/AutoGen.py | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py
> index e8e09dc8a366..24592593c868 100644
> --- a/BaseTools/Source/Python/AutoGen/AutoGen.py
> +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
> @@ -792,10 +792,13 @@ class WorkspaceAutoGen(AutoGen):
>
> # add PcdToken Number file for Dynamic/DynamicEx Pcd
> #
> AllWorkSpaceMetaFiles.add(os.path.join(self.BuildDir, 'PcdTokenNumber'))
>
> + for Pa in self.AutoGenObjectList:
> + AllWorkSpaceMetaFiles.add(Pa.ToolDefinitionFile)
> +
> for Arch in self.ArchList:
> #
> # add dec
> #
> for Package in PlatformAutoGen(self, self.MetaFile, Target, Toolchain, Arch).PackageList:
> @@ -1859,11 +1862,11 @@ class PlatformAutoGen(AutoGen):
> def ToolDefinition(self):
> ToolDefinition = self.Workspace.ToolDef.ToolsDefTxtDictionary
> 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("_")
> if Target != self.BuildTarget or Tag != self.ToolChain or Arch != self.Arch:
> continue
> @@ -1873,11 +1876,11 @@ class PlatformAutoGen(AutoGen):
> if Attr == "DLL":
> DllPathList.add(Value)
> continue
>
> if Tool not in RetVal:
> - RetVal[Tool] = {}
> + RetVal[Tool] = OrderedDict()
> RetVal[Tool][Attr] = Value
>
> ToolsDef = ''
> if GlobalData.gOptions.SilentMode and "MAKE" in RetVal:
> if "FLAGS" not in RetVal["MAKE"]:
>
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-07-10 10:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-28 3:32 [Patch 1/1] BaseTools: Detect the change of env variable used in tooldef.txt Bob Feng
2019-07-09 2:56 ` Liming Gao
2019-07-10 10:45 ` [edk2-devel] " Philippe Mathieu-Daudé
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox