diff options
author | Michael D Kinney <michael.d.kinney@intel.com> | 2021-05-07 08:40:29 -0700 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2021-05-10 23:28:58 +0000 |
commit | ef3840c1ff320698523dd6b94ba7c86354392784 (patch) | |
tree | de81ba023f52d0cfde707e6afa11ec4902ebf47d /BaseTools/Source/Python/AutoGen | |
parent | 375f2d8e684dce2ab6f375382f35e546c7ab62ee (diff) | |
download | edk2-ef3840c1ff320698523dd6b94ba7c86354392784.tar.gz edk2-ef3840c1ff320698523dd6b94ba7c86354392784.tar.bz2 edk2-ef3840c1ff320698523dd6b94ba7c86354392784.zip |
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 <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/AutoGen')
-rw-r--r-- | BaseTools/Source/Python/AutoGen/PlatformAutoGen.py | 7 |
1 files changed, 3 insertions, 4 deletions
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":
|