summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/build/build.py
diff options
context:
space:
mode:
authorFan, ZhijuX <zhijux.fan@intel.com>2020-03-26 17:48:04 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2020-03-31 04:09:43 +0000
commit8c944c938359cffda4c889259b3d2aba69e9ee7b (patch)
treecb2c3f1664ad0770def940c9b2ffda2cb9153d6a /BaseTools/Source/Python/build/build.py
parentf34c7645bd87c61f72c2bc4a8f88afabc69de512 (diff)
downloadedk2-8c944c938359cffda4c889259b3d2aba69e9ee7b.tar.gz
edk2-8c944c938359cffda4c889259b3d2aba69e9ee7b.tar.bz2
edk2-8c944c938359cffda4c889259b3d2aba69e9ee7b.zip
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>
Diffstat (limited to 'BaseTools/Source/Python/build/build.py')
-rwxr-xr-xBaseTools/Source/Python/build/build.py16
1 files changed, 3 insertions, 13 deletions
diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py
index d841fefdc5..bec848a7b2 100755
--- a/BaseTools/Source/Python/build/build.py
+++ b/BaseTools/Source/Python/build/build.py
@@ -2347,7 +2347,7 @@ class Build():
toolName = split[3]
path = '_'.join(split[0:4]) + '_PATH'
path = self.ToolDef.ToolsDefTxtDictionary[path]
- path = self.GetFullPathOfTool(path)
+ path = self.GetRealPathOfTool(path)
guidAttribs.append((guid, toolName, path))
# Write out GuidedSecTools.txt
@@ -2357,21 +2357,11 @@ class Build():
print(' '.join(guidedSectionTool), file=toolsFile)
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):
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
## Launch the module or platform build