mirror of
https://github.com/acidanthera/audk.git
synced 2025-04-08 17:05:09 +02:00
BaseTools: Fixed the issue when ToolDefinitionFile is not generated
ToolDefinitionFile is generated by PlatformAutoGen.ToolDefinition() Code assume ToolDefinition is always called before using ToolDefinitionFile, but in some cases, it's not true. This patch is to fix this issue. Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
parent
c630f69df0
commit
2d100d1d73
@ -1912,8 +1912,8 @@ class PlatformAutoGen(AutoGen):
|
||||
else:
|
||||
ToolsDef += "%s_%s = %s\n" % (Tool, Attr, Value)
|
||||
ToolsDef += "\n"
|
||||
|
||||
SaveFileOnChange(self.ToolDefinitionFile, ToolsDef, False)
|
||||
tool_def_file = os.path.join(self.MakeFileDir, "TOOLS_DEF." + self.Arch)
|
||||
SaveFileOnChange(tool_def_file, ToolsDef, False)
|
||||
for DllPath in DllPathList:
|
||||
os.environ["PATH"] = DllPath + os.pathsep + os.environ["PATH"]
|
||||
os.environ["MAKE_FLAGS"] = MakeFlags
|
||||
@ -1923,7 +1923,10 @@ class PlatformAutoGen(AutoGen):
|
||||
## Return the paths of tools
|
||||
@cached_property
|
||||
def ToolDefinitionFile(self):
|
||||
return os.path.join(self.MakeFileDir, "TOOLS_DEF." + self.Arch)
|
||||
tool_def_file = os.path.join(self.MakeFileDir, "TOOLS_DEF." + self.Arch)
|
||||
if not os.path.exists(tool_def_file):
|
||||
self.ToolDefinition
|
||||
return tool_def_file
|
||||
|
||||
## Retrieve the toolchain family of given toolchain tag. Default to 'MSFT'.
|
||||
@cached_property
|
||||
|
Loading…
x
Reference in New Issue
Block a user