From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 2132821A134BB for ; Mon, 22 May 2017 23:42:53 -0700 (PDT) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 May 2017 23:42:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,381,1491289200"; d="scan'208";a="105436764" Received: from shwdeopenpsi168.ccr.corp.intel.com ([10.239.158.121]) by fmsmga005.fm.intel.com with ESMTP; 22 May 2017 23:42:52 -0700 From: Yonghong Zhu To: edk2-devel@lists.01.org Cc: Liming Gao Date: Tue, 23 May 2017 14:42:48 +0800 Message-Id: <1495521768-8016-1-git-send-email-yonghong.zhu@intel.com> X-Mailer: git-send-email 2.6.1.windows.1 Subject: [Patch V2] BaseTools: Fix incremental build bug on DynamicPcd Token Generation X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 06:42:53 -0000 During incremental build, we meet the bug that the different drivers use the different token for the same DynamicPcd. Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu --- BaseTools/Source/Python/AutoGen/AutoGen.py | 17 +++++++++++++++++ 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 736c1ae..fa6ec56 100644 --- a/BaseTools/Source/Python/AutoGen/AutoGen.py +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py @@ -669,10 +669,23 @@ class WorkspaceAutoGen(AutoGen): content += 'BuildOptionPcd: ' content += str(GlobalData.BuildOptionPcd) 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) # @@ -722,10 +735,14 @@ class WorkspaceAutoGen(AutoGen): # add BuildOption metafile # 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 bd14e27..fd94ae6 100644 --- a/BaseTools/Source/Python/build/build.py +++ b/BaseTools/Source/Python/build/build.py @@ -1,10 +1,10 @@ ## @file # build a platform or a module # # Copyright (c) 2014, Hewlett-Packard Development Company, L.P.
-# Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.
+# Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at # http://opensource.org/licenses/bsd-license.php @@ -52,11 +52,11 @@ import Common.EdkLogger 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'] ## build configuration file -- 2.6.1.windows.1