public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH V3] BaseTools:GuidedSectionTools.txt is not generated correctly
@ 2020-03-17 10:17 Fan, ZhijuX
  0 siblings, 0 replies; only message in thread
From: Fan, ZhijuX @ 2020-03-17 10:17 UTC (permalink / raw)
  To: devel; +Cc: Zhiju . Fan, Liming Gao, Bob Feng

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2538

For LzmaCompress or BrotliCompress, the platform may use the different
options and add their batch file, such as LzmaCompressPlatform.
Then, specify it in platform.dsc [BuildOptions] to override the default
one in tools_def.txt.

*_*_*_LZMA_PATH = LzmaCompressPlatform

This override tool will be used. But, its name is not specified in the
generated GuidedSectionTools.txt.

Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
---
Change full path is only used on non-windows systems

 BaseTools/Source/Python/AutoGen/PlatformAutoGen.py | 4 +++-
 BaseTools/Source/Python/build/build.py             | 3 ++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py b/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py
index d32178b00c93..478a5116fd7a 100644
--- a/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py
@@ -866,7 +866,9 @@ class PlatformAutoGen(AutoGen):
                             Value += " " + self._BuildOptionWithToolDef(RetVal)[Tool][Attr]
                         else:
                             Value = self._BuildOptionWithToolDef(RetVal)[Tool][Attr]
-
+                            Def = '_'.join([self.BuildTarget, self.ToolChain, self.Arch, Tool, Attr])
+                            if self.Workspace.ToolDef.ToolsDefTxtDictionary.get(Def):
+                                self.Workspace.ToolDef.ToolsDefTxtDictionary[Def] = Value
                 if Attr == "PATH":
                     # Don't put MAKE definition in the file
                     if Tool != "MAKE":
diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py
index d841fefdc502..4d4615c0e94a 100755
--- a/BaseTools/Source/Python/build/build.py
+++ b/BaseTools/Source/Python/build/build.py
@@ -2347,7 +2347,8 @@ class Build():
                                 toolName = split[3]
                                 path = '_'.join(split[0:4]) + '_PATH'
                                 path = self.ToolDef.ToolsDefTxtDictionary[path]
-                                path = self.GetFullPathOfTool(path)
+                                if sys.platform != "win32":
+                                    path = self.GetFullPathOfTool(path)
                                 guidAttribs.append((guid, toolName, path))
 
                     # Write out GuidedSecTools.txt
-- 
2.14.1.windows.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-03-17 10:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-17 10:17 [PATCH V3] BaseTools:GuidedSectionTools.txt is not generated correctly Fan, ZhijuX

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox