diff options
author | Yonghong Zhu <yonghong.zhu@intel.com> | 2017-05-22 22:01:26 +0800 |
---|---|---|
committer | Guo Mang <mang.guo@intel.com> | 2017-07-12 11:24:49 +0800 |
commit | 68152d4678f329d5241e6aa3681f68b36422472e (patch) | |
tree | c0475ce435cb66263ecc1caa765029564d3d98b6 /BaseTools/Source/Python | |
parent | 5ac26339f34a468216743ad76e664a94d8e4219e (diff) | |
download | edk2-platforms-68152d4678f329d5241e6aa3681f68b36422472e.tar.xz |
BaseTools: Fix incremental build bug on DynamicPcd Token Generation
During incremental build, we meet the bug that the different drivers use
the different token for the same DynamicPcd.
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>
(cherry picked from commit 99adfe9f51cbe105ec12f0572571fc85762382fb)
Diffstat (limited to 'BaseTools/Source/Python')
-rw-r--r-- | BaseTools/Source/Python/AutoGen/AutoGen.py | 17 | ||||
-rw-r--r-- | BaseTools/Source/Python/build/build.py | 4 |
2 files changed, 19 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py index 736c1ae976..fa6ec5608f 100644 --- a/BaseTools/Source/Python/AutoGen/AutoGen.py +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py @@ -671,6 +671,19 @@ class WorkspaceAutoGen(AutoGen): SaveFileOnChange(os.path.join(self.BuildDir, 'BuildOptions'), content, False)
#
+ # Create PcdToken Number file for Dynamic/DynamicEx Pcd.
+ #
+ PcdTokenNumber = 'PcdTokenNumber: '
+ if Pa.PcdTokenNumber:
+ if Pa.DynamicPcdList:
+ for Pcd in Pa.DynamicPcdList:
+ PcdTokenNumber += os.linesep
+ PcdTokenNumber += str((Pcd.TokenCName, Pcd.TokenSpaceGuidCName))
+ PcdTokenNumber += ' : '
+ PcdTokenNumber += str(Pa.PcdTokenNumber[Pcd.TokenCName, Pcd.TokenSpaceGuidCName])
+ SaveFileOnChange(os.path.join(self.BuildDir, 'PcdTokenNumber'), PcdTokenNumber, False)
+
+ #
# Get set of workspace metafiles
#
AllWorkSpaceMetaFiles = self._GetMetaFiles(Target, Toolchain, Arch)
@@ -724,6 +737,10 @@ class WorkspaceAutoGen(AutoGen): #
AllWorkSpaceMetaFiles.add(os.path.join(self.BuildDir, 'BuildOptions'))
+ # add PcdToken Number file for Dynamic/DynamicEx Pcd
+ #
+ AllWorkSpaceMetaFiles.add(os.path.join(self.BuildDir, 'PcdTokenNumber'))
+
for Arch in self.ArchList:
Platform = self.BuildDatabase[self.MetaFile, Arch, Target, Toolchain]
PGen = PlatformAutoGen(self, self.MetaFile, Target, Toolchain, Arch)
diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py index bd14e273d2..fd94ae69d2 100644 --- a/BaseTools/Source/Python/build/build.py +++ b/BaseTools/Source/Python/build/build.py @@ -2,7 +2,7 @@ # build a platform or a module
#
# Copyright (c) 2014, Hewlett-Packard Development Company, L.P.<BR>
-# Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@@ -54,7 +54,7 @@ import Common.GlobalData as GlobalData # Version and Copyright
VersionNumber = "0.60" + ' ' + gBUILD_VERSION
__version__ = "%prog Version " + VersionNumber
-__copyright__ = "Copyright (c) 2007 - 2016, Intel Corporation All rights reserved."
+__copyright__ = "Copyright (c) 2007 - 2017, Intel Corporation All rights reserved."
## standard targets of build command
gSupportedTarget = ['all', 'genc', 'genmake', 'modules', 'libraries', 'fds', 'clean', 'cleanall', 'cleanlib', 'run']
|