summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/AutoGen
diff options
context:
space:
mode:
authorBob Feng <bob.c.feng@intel.com>2019-12-11 19:22:21 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2019-12-18 01:01:57 +0000
commit78fb6b0e022f2e0835ca6d075f4a7a36e36d0f23 (patch)
tree933c8f60659a7218692319ac2a1f3b0d1c7e8695 /BaseTools/Source/Python/AutoGen
parentbfb141cf19dd6f9b8df8b9d0914a5b3b15e1a798 (diff)
downloadedk2-78fb6b0e022f2e0835ca6d075f4a7a36e36d0f23.tar.gz
edk2-78fb6b0e022f2e0835ca6d075f4a7a36e36d0f23.tar.bz2
edk2-78fb6b0e022f2e0835ca6d075f4a7a36e36d0f23.zip
BaseTools: Fix build failure when multiple build targets given
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2371 This patch is to fix a regression issue that build fails if multiple build targets given. Two changes cause this regression issue. One is AutoGen object __hash__ function only hash file path and arch, missing ToolChain and build target. The other is changing the multiple-thread-genfds function as default build behavior. To generate the genffs command to Makefile, there is a global data set is used, GenFdsGlobalVariable, which cause build tool use the data of first build-target build in the second build-target build. Signed-off-by: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Steven Shi <steven.shi@intel.com> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/AutoGen')
-rwxr-xr-xBaseTools/Source/Python/AutoGen/ModuleAutoGen.py2
-rw-r--r--BaseTools/Source/Python/AutoGen/PlatformAutoGen.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py b/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py
index 74662d1b52..aad591de65 100755
--- a/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py
@@ -270,7 +270,7 @@ class ModuleAutoGen(AutoGen):
#
@cached_class_function
def __hash__(self):
- return hash((self.MetaFile, self.Arch))
+ return hash((self.MetaFile, self.Arch, self.ToolChain,self.BuildTarget))
def __repr__(self):
return "%s [%s]" % (self.MetaFile, self.Arch)
diff --git a/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py b/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py
index 4c3cdf82d5..7bd24dad42 100644
--- a/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py
@@ -148,7 +148,7 @@ class PlatformAutoGen(AutoGen):
#
@cached_class_function
def __hash__(self):
- return hash((self.MetaFile, self.Arch))
+ return hash((self.MetaFile, self.Arch,self.ToolChain,self.BuildTarget))
@cached_class_function
def __repr__(self):
return "%s [%s]" % (self.MetaFile, self.Arch)