From ef3840c1ff320698523dd6b94ba7c86354392784 Mon Sep 17 00:00:00 2001 From: Michael D Kinney Date: Fri, 7 May 2021 08:40:29 -0700 Subject: BaseTools: Fix DSC override of Guided tool REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3359 If the DSC file provides an override of a Guided tool path and/or Guided tool GUID value, then make sure the one from the DSC file is used if it is higher priority than the Guided tool in the tools_def.txt file. This makes the Guided tool used by GenFds match the tool listed GuidedSectionTools.txt. Cc: Bob Feng Cc: Liming Gao Cc: Yuwei Chen Signed-off-by: Michael D Kinney Reviewed-by: Bob Feng --- BaseTools/Source/Python/AutoGen/PlatformAutoGen.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'BaseTools/Source/Python/AutoGen/PlatformAutoGen.py') diff --git a/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py b/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py index 832c0da86b..592d4824a4 100644 --- a/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py +++ b/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py @@ -918,14 +918,13 @@ class PlatformAutoGen(AutoGen): if Tool in self._BuildOptionWithToolDef(RetVal) and Attr in self._BuildOptionWithToolDef(RetVal)[Tool]: # check if override is indicated if self._BuildOptionWithToolDef(RetVal)[Tool][Attr].startswith('='): - Value = self._BuildOptionWithToolDef(RetVal)[Tool][Attr][1:] + Value = self._BuildOptionWithToolDef(RetVal)[Tool][Attr][1:].strip() else: - if Attr != 'PATH': + # Do not append PATH or GUID + if Attr != 'PATH' and Attr != 'GUID': Value += " " + self._BuildOptionWithToolDef(RetVal)[Tool][Attr] else: 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": # Don't put MAKE definition in the file if Tool != "MAKE": -- cgit v1.2.3