diff options
author | Yingke Liu <yingke.d.liu@intel.com> | 2015-07-02 03:42:34 +0000 |
---|---|---|
committer | yingke <yingke@Edk2> | 2015-07-02 03:42:34 +0000 |
commit | 5015bee226c293c32c9ef2cc7669826edb5a0aed (patch) | |
tree | 83ed49ec35053cd5b04e37c82733788f5417dc40 /BaseTools/Source/Python/AutoGen/AutoGen.py | |
parent | c587fd3eddce6532b3b71bf80a9cf0d70b7f45e7 (diff) | |
download | edk2-platforms-5015bee226c293c32c9ef2cc7669826edb5a0aed.tar.xz |
BaseTools: Fixed BuildOptions bug.
The BuildOptions in an INF should also follow override rule: If '==' is used, all previous options are overridden.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <yingke.d.liu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17796 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Source/Python/AutoGen/AutoGen.py')
-rw-r--r-- | BaseTools/Source/Python/AutoGen/AutoGen.py | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py index 7fb1a8889a..259abc519b 100644 --- a/BaseTools/Source/Python/AutoGen/AutoGen.py +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py @@ -2000,7 +2000,6 @@ class PlatformAutoGen(AutoGen): if Options.get((self.BuildRuleFamily, NowKey)) != None:
Options.pop((self.BuildRuleFamily, NowKey))
- OverrideOpt = set()
for Key in Options:
if ModuleStyle != None and len (Key) > 2:
# Check Module style is EDK or EDKII.
@@ -2026,9 +2025,7 @@ class PlatformAutoGen(AutoGen): if Arch == "*" or Arch == self.Arch:
if Tool not in BuildOptions:
BuildOptions[Tool] = {}
- if Options[Key].startswith('='):
- OverrideOpt.add((Tool, Attr))
- if Attr != "FLAGS" or Attr not in BuildOptions[Tool] or (Tool, Attr) in OverrideOpt:
+ 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
@@ -2037,7 +2034,6 @@ class PlatformAutoGen(AutoGen): if FamilyMatch or FamilyIsNull:
return BuildOptions
- OverrideOpt = set()
for Key in Options:
if ModuleStyle != None and len (Key) > 2:
# Check Module style is EDK or EDKII.
@@ -2061,9 +2057,7 @@ class PlatformAutoGen(AutoGen): if Arch == "*" or Arch == self.Arch:
if Tool not in BuildOptions:
BuildOptions[Tool] = {}
- if Options[Key].startswith('='):
- OverrideOpt.add((Tool, Attr))
- if Attr != "FLAGS" or Attr not in BuildOptions[Tool] or (Tool, Attr) in OverrideOpt:
+ 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
@@ -2103,7 +2097,6 @@ class PlatformAutoGen(AutoGen): PlatformModuleOptions.keys() + ModuleTypeOptions.keys() +
self.ToolDefinition.keys())
BuildOptions = {}
- OverrideTool = set()
for Tool in AllTools:
if Tool not in BuildOptions:
BuildOptions[Tool] = {}
@@ -2122,9 +2115,8 @@ class PlatformAutoGen(AutoGen): BuildOptions[Tool][Attr] = ""
# check if override is indicated
if Value.startswith('='):
- OverrideTool.add((Tool, Attr))
BuildOptions[Tool][Attr] = Value[1:]
- elif (Tool, Attr) not in OverrideTool:
+ else:
BuildOptions[Tool][Attr] += " " + Value
if Module.AutoGenVersion < 0x00010005 and self.Workspace.UniFlag != None:
#
|