mirror of https://github.com/acidanthera/audk.git
BaseTools:GuidedSectionTools.txt is not generated correctly
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> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
This commit is contained in:
parent
f34c7645bd
commit
8c944c9383
|
@ -866,7 +866,8 @@ class PlatformAutoGen(AutoGen):
|
||||||
Value += " " + self._BuildOptionWithToolDef(RetVal)[Tool][Attr]
|
Value += " " + self._BuildOptionWithToolDef(RetVal)[Tool][Attr]
|
||||||
else:
|
else:
|
||||||
Value = self._BuildOptionWithToolDef(RetVal)[Tool][Attr]
|
Value = self._BuildOptionWithToolDef(RetVal)[Tool][Attr]
|
||||||
|
Def = '_'.join([self.BuildTarget, self.ToolChain, self.Arch, Tool, Attr])
|
||||||
|
self.Workspace.ToolDef.ToolsDefTxtDictionary[Def] = Value
|
||||||
if Attr == "PATH":
|
if Attr == "PATH":
|
||||||
# Don't put MAKE definition in the file
|
# Don't put MAKE definition in the file
|
||||||
if Tool != "MAKE":
|
if Tool != "MAKE":
|
||||||
|
|
|
@ -2347,7 +2347,7 @@ class Build():
|
||||||
toolName = split[3]
|
toolName = split[3]
|
||||||
path = '_'.join(split[0:4]) + '_PATH'
|
path = '_'.join(split[0:4]) + '_PATH'
|
||||||
path = self.ToolDef.ToolsDefTxtDictionary[path]
|
path = self.ToolDef.ToolsDefTxtDictionary[path]
|
||||||
path = self.GetFullPathOfTool(path)
|
path = self.GetRealPathOfTool(path)
|
||||||
guidAttribs.append((guid, toolName, path))
|
guidAttribs.append((guid, toolName, path))
|
||||||
|
|
||||||
# Write out GuidedSecTools.txt
|
# Write out GuidedSecTools.txt
|
||||||
|
@ -2357,21 +2357,11 @@ class Build():
|
||||||
print(' '.join(guidedSectionTool), file=toolsFile)
|
print(' '.join(guidedSectionTool), file=toolsFile)
|
||||||
toolsFile.close()
|
toolsFile.close()
|
||||||
|
|
||||||
## Returns the full path of the tool.
|
## Returns the real path of the tool.
|
||||||
#
|
#
|
||||||
def GetFullPathOfTool (self, tool):
|
def GetRealPathOfTool (self, tool):
|
||||||
if os.path.exists(tool):
|
if os.path.exists(tool):
|
||||||
return os.path.realpath(tool)
|
return os.path.realpath(tool)
|
||||||
else:
|
|
||||||
# We need to search for the tool using the
|
|
||||||
# PATH environment variable.
|
|
||||||
for dirInPath in os.environ['PATH'].split(os.pathsep):
|
|
||||||
foundPath = os.path.join(dirInPath, tool)
|
|
||||||
if os.path.exists(foundPath):
|
|
||||||
return os.path.realpath(foundPath)
|
|
||||||
|
|
||||||
# If the tool was not found in the path then we just return
|
|
||||||
# the input tool.
|
|
||||||
return tool
|
return tool
|
||||||
|
|
||||||
## Launch the module or platform build
|
## Launch the module or platform build
|
||||||
|
|
Loading…
Reference in New Issue