summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/AutoGen
diff options
context:
space:
mode:
authorYonghong Zhu <yonghong.zhu@intel.com>2017-02-15 14:47:47 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2017-02-17 09:37:12 +0800
commit958163561e9b6d8fa40ea4aac49d46cc889015ac (patch)
treeedfa99af0407b60276b1a103d2456cb2313fd3e0 /BaseTools/Source/Python/AutoGen
parentb173ad78519b2ade309019614b52e1453727e20d (diff)
downloadedk2-958163561e9b6d8fa40ea4aac49d46cc889015ac.tar.gz
edk2-958163561e9b6d8fa40ea4aac49d46cc889015ac.tar.bz2
edk2-958163561e9b6d8fa40ea4aac49d46cc889015ac.zip
BaseTools: Fix bug for GUIDED tool path override by DSC [BuildOptions]
Current the GUIDED tool path can't be override to the different path in the [BuildOptions] of DSC file. This patch fix the bug. Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=283 Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/AutoGen')
-rw-r--r--BaseTools/Source/Python/AutoGen/AutoGen.py24
1 files changed, 18 insertions, 6 deletions
diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py
index c35f0b2fdb..06e674a506 100644
--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
@@ -1718,7 +1718,10 @@ class PlatformAutoGen(AutoGen):
if self.BuildOption[Tool][Attr].startswith('='):
Value = self.BuildOption[Tool][Attr][1:]
else:
- Value += " " + self.BuildOption[Tool][Attr]
+ if Attr != 'PATH':
+ Value += " " + self.BuildOption[Tool][Attr]
+ else:
+ Value = self.BuildOption[Tool][Attr]
if Attr == "PATH":
# Don't put MAKE definition in the file
@@ -2381,8 +2384,11 @@ class PlatformAutoGen(AutoGen):
if Attr != "FLAGS" or Attr not in BuildOptions[Tool] or Options[Key].startswith('='):
BuildOptions[Tool][Attr] = Options[Key]
else:
- # append options for the same tool
- BuildOptions[Tool][Attr] += " " + Options[Key]
+ # append options for the same tool except PATH
+ if Attr != 'PATH':
+ BuildOptions[Tool][Attr] += " " + Options[Key]
+ else:
+ BuildOptions[Tool][Attr] = Options[Key]
# Build Option Family has been checked, which need't to be checked again for family.
if FamilyMatch or FamilyIsNull:
return BuildOptions
@@ -2413,8 +2419,11 @@ class PlatformAutoGen(AutoGen):
if Attr != "FLAGS" or Attr not in BuildOptions[Tool] or Options[Key].startswith('='):
BuildOptions[Tool][Attr] = Options[Key]
else:
- # append options for the same tool
- BuildOptions[Tool][Attr] += " " + Options[Key]
+ # append options for the same tool except PATH
+ if Attr != 'PATH':
+ BuildOptions[Tool][Attr] += " " + Options[Key]
+ else:
+ BuildOptions[Tool][Attr] = Options[Key]
return BuildOptions
## Append build options in platform to a module
@@ -2473,7 +2482,10 @@ class PlatformAutoGen(AutoGen):
BuildOptions[Tool][Attr] = ToolPath
else:
Value = mws.handleWsMacro(Value)
- BuildOptions[Tool][Attr] += " " + Value
+ if Attr != 'PATH':
+ BuildOptions[Tool][Attr] += " " + Value
+ else:
+ BuildOptions[Tool][Attr] = Value
if Module.AutoGenVersion < 0x00010005 and self.Workspace.UniFlag != None:
#
# Override UNI flag only for EDK module.