From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id D1F7A940FDD for ; Sat, 20 Jan 2024 02:05:50 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=1HNJfpnkUZiAKCtP53Cy4oao0Om0TugcQl1iRZy/bAg=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1705716349; v=1; b=dJujO95q3c5tTeG7df4cUtG9WUecPF04X+AdCN7U1+DDIdnvzlAQyIGDMi62wFCeK/TGYYK7 +uWzpIHCrzzEn4dfyOBVIpaj2kkQqM0IxeQHvoQpBqe7JadKwKob/zfoW3CajdHJVZDbCF0WsUD pgpRnNc0tS8zAgkGB9MK8DiM= X-Received: by 127.0.0.2 with SMTP id VobAYY7687511x4AxNmC8zBg; Fri, 19 Jan 2024 18:05:49 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by mx.groups.io with SMTP id smtpd.web10.12803.1705716348292571490 for ; Fri, 19 Jan 2024 18:05:48 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10957"; a="14415813" X-IronPort-AV: E=Sophos;i="6.05,206,1701158400"; d="scan'208";a="14415813" X-Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jan 2024 18:05:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10957"; a="904316710" X-IronPort-AV: E=Sophos;i="6.05,206,1701158400"; d="scan'208";a="904316710" X-Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by fmsmga002.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 19 Jan 2024 18:05:47 -0800 X-Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Fri, 19 Jan 2024 18:05:47 -0800 X-Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Fri, 19 Jan 2024 18:05:47 -0800 X-Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.169) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Fri, 19 Jan 2024 18:05:45 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dJCZr8PLe0cPz8nFHXXn3CtILHCXvNp1BN+aDS0LDJbmmOfz/ixudn9FbNDBvxUr7sD60OvWlkBJr/yNIZGmBDbcljUCjKEa3lyn4z3LhfODcF0WKWK5M83lz8i17gJzYYFPpZ7VyyXtNZVQeN3ugy2++fB2pNZl820BqL+Uyd4TdOKkA5YtiArvFwghiX1iBxCSlx1kzwtacK3TxEW1mi5jskwPWMrCR2LKPEg3s7DVOCQt0rZoTpI03Uev0BdsLmdvdXZq1IXAMJdnqXrekAYeVBqBDOid4cEN5WFAK3U+vOCkduyqGKw79VXc1EHltVJ+P4Euqqq0cjX62nx89w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=RA6kWziUS3vQNeEwD/9fu6BtLnJp1wBcR8lWzq3KxHc=; b=Nz+OIYIMp260h8vCfgcixrEgszOotapcGd9ISrx8sXxn2y/LRz7strYc3nNiTDIzK90SWbonc2nBau7uIbHYzqNPkfmEX/hbbDwoXEFOLLk3j3TTDOGptoYiDAfkezeA2gx1nyNdMT75I3V45mTQtHJtUB0ylghZhlvIwvr79NVPDmQM0DwX+xJMw2cx4PUjF88NfnHmrccT0x1fZgVUNf5mwH83bFsqAGhbvNhvmwwv1FDEz5N4tX7xzMET+A38NCNO+LXxZJQ4ot/74UUFxJGhq4tySNToYrEF58uR/965ctAIzu2IgqMh2Y8NURaJr6WjAxpiD8c1UZ/usZfgaw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none X-Received: from CO1PR11MB4929.namprd11.prod.outlook.com (2603:10b6:303:6d::19) by SA1PR11MB8394.namprd11.prod.outlook.com (2603:10b6:806:37c::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.26; Sat, 20 Jan 2024 02:05:43 +0000 X-Received: from CO1PR11MB4929.namprd11.prod.outlook.com ([fe80::4382:5b03:f13:88ff]) by CO1PR11MB4929.namprd11.prod.outlook.com ([fe80::4382:5b03:f13:88ff%4]) with mapi id 15.20.7202.026; Sat, 20 Jan 2024 02:05:43 +0000 From: "Michael D Kinney" To: "devel@edk2.groups.io" , "S, Ashraf Ali" CC: "Chen, Christine" , Rebecca Cran , Liming Gao , "Feng, Bob C" , "Chan, Amy" , "Chaganty, Rangasai V" , "Solanki, Digant H" , "Kinney, Michael D" Subject: Re: [edk2-devel] [PATCH] BaseTools: Optimize GenerateByteArrayValue and CollectPlatformGuids APIs Thread-Topic: [edk2-devel] [PATCH] BaseTools: Optimize GenerateByteArrayValue and CollectPlatformGuids APIs Thread-Index: AQHaSRr4zjZxN4xxmU2bdFdODZOPTLDh92OQ Date: Sat, 20 Jan 2024 02:05:43 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: CO1PR11MB4929:EE_|SA1PR11MB8394:EE_ x-ms-office365-filtering-correlation-id: 45738111-205a-43f2-58be-08dc195c4f03 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: sqGttie9WZyiXTfrhB6Vm/lg40gZ4f0zQYJF2eG55M1Gu9+mJNd/fJRE8UQ4S65CRzXYXBNZUc43zCr78SnBLDgkvZu2nRjOK8638UzzTUiI30cF9jmMObL4UIOyvfhV85eFAGblQci7pCSTXUxq6U5AbD6hr6uDfBNiA4YM2N5HlHFkxTGzX8scgbfQknHFSRw+PNFNPA/1Wmxb4/mZrCLDHL5hvTspujmP903WWMGbi2AuCBp5rYDTn9ZOgNeT5tdBvTTYApucbKoyLCCn89mAVKQ6Bl/8JZCMcKUqb61b566Taw1RhBUIN1XqqJQydD5TjDtYa43i3kVpN5G8HCs2tAUKuoLuJL8qnyegq0w1LSLPHCqysLpojrPImcIy8XIRbZs3LZTG7JbIs5zaIcJQYy6ToJ61hxZaliTsvvim4yuStCZxfd7GFSDJ5vQ5+oaQVkpmmvf5lD8riPwdqd4mpMQTEvo29fnnk6r0u9Z95bCeD9dZWlc5UDPXRqYTwoi6R4ZL9PO1QBODJuGKlsni73WkjRMECjSBXW+a4HTip2iBY6EG5bMj7e0UBD2L3R8A5RJrj7RCPlUkliWnaJuKmayILkBZMxJe7dHzyP0+r3g5p7B8floj+/AkoNUmvr7d5mAbbBKSWWnWwYI01g== x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?v0eXcvyHwPNGCgpoad/SIvAJcl/XYplTyw7Eo0YzP5J1EYajXhGzuyo2wIMy?= =?us-ascii?Q?syx4owZXOczB077AZ5GsH8Nlc/T8M7upJy/smcyOaCdZK/AhtHWyYFB+4+Pw?= =?us-ascii?Q?cADx7ttX9hX+WwV3KyFt8XLzivBkzk7ag9J3+qgTZ40GWKmL3VHr4r2wKWAA?= =?us-ascii?Q?pQLr+rJzR/+i5GdVGhvyKOpBY6HKut1wHuSuRKLRc79Eidk2jQaqFEJN1rmm?= =?us-ascii?Q?YauDiOELcfAD4d+9ZK1t7Wlft+hfqsyhDJr2KGGy0NgDUCR242OiFEeLbXfR?= =?us-ascii?Q?5M1kbuxq351tzA1qq7NonTkATjY9OM/P2RiD9gi1FV9/hM7SrxDT4o8m13qu?= =?us-ascii?Q?hN+TaSdOqTBrbKQ1a0V7rjWXkTz0LWK8OEmUEXfTXIsKw/Az2NauSKcTXQhq?= =?us-ascii?Q?9wttnXfxXdbYURCy1+1drT5NFeVojdZQjUF9Z+MJgXPzfmlTHnFB8rA083OL?= =?us-ascii?Q?ZucdBj5B11RZRabjoO22YPV8ofnGT2RkpDQlmkbYf9Dy5oJgbMmjdAj/vi3n?= =?us-ascii?Q?0B4YRUeJD8C4Z1nhtLc3ayXiZ5zZnmMJY1SrKT3xEBiIaZth23+eXf4u62m0?= =?us-ascii?Q?ybFw5DDJ8J/LSyqqfO33k8d7KkpeYZw1+w1LpIhHUnncYlh6yRjatPZixDRs?= =?us-ascii?Q?JBHGuJel9sf2YPb2z28+Tg15gFbX518Zb9mo8vo2+D4l1Utqg2k8c+DAJF0v?= =?us-ascii?Q?vTcXa3G3ZimA1xi3magpBUjkgRZAlxTsmZn8Ou4WurhNrcjAR1K8VHOq4erp?= =?us-ascii?Q?cnBCQNxXPGQdpr4YupUwZY/LChN+N/SNpGLzD+HjRbXyx4CZ3HgKBDvtIKce?= =?us-ascii?Q?SfDB+3mKkW9JGcwkN3txT5L/+lMSp2qu8yDKCd0rLyBNUPD00ZlMaBF6iTiT?= =?us-ascii?Q?QpBMmrDM2Ozjq8Q0j/Sx2ZGqcA9gtJX29/9uj2YSziSicdfHvpsOabY4lx5M?= =?us-ascii?Q?3GhM3F+ONTN7j5BxVzN1bqDXDX8J2evMiudRO9u9sLmFYHn6U560MjnVqcey?= =?us-ascii?Q?hOQgHD2DNzxmHT+IhzCV/RUH7R0KG/xBDLc+3HVdz8NywunxDbLNvPJS7Qj1?= =?us-ascii?Q?MRVwUwu4h9GoAJ9ijgj1OEW4mbgP7O3bbq8mqlzhnJmFrJcAsEVDnfSg1qhw?= =?us-ascii?Q?32PqPfsELghHvxNhwtqxWrI/eLtXydUOHqfdxPyfPrGL/avHLDx4G4Cye2BY?= =?us-ascii?Q?lkijP3uPW2KE0a9cUXDJQZeI1w6HEme4EcEY7ONVfRItPM9Z9G3vwWUAhY7p?= =?us-ascii?Q?deXgeMKMd/siEs82NjEt53q1DkJ3GF/rKT9ncCSuY6mnkfWj1ZK3fcvysE9Z?= =?us-ascii?Q?xaiWxA5lRJw3MSOc1gSuvAm4KAJIngIaIYSMivx/8aKJ3kq+cXQEDrfycXKt?= =?us-ascii?Q?m9PTx4gK7+GusPbZ87hLa4fNLCgALZxM7c7bU8CVn/083HSa0oqB4wy+2qwO?= =?us-ascii?Q?KMTB271HjhljD7kErZwCvJp2Ul89J1OdwQHR0Ft9bN15SJh0I4H8XCcinJjx?= =?us-ascii?Q?aaPa13oq1kfuv2w5DcndwcLYngRR9tIcYN5s/BMSHkgXuFBTnD4QqB6lRLOQ?= =?us-ascii?Q?JQTsBH7gsMxXWYSbSyrph2LUIM93+Ls5TNdLgLfaI5QiuqP4kUGeuGEMLuJ5?= =?us-ascii?Q?CQ=3D=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO1PR11MB4929.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 45738111-205a-43f2-58be-08dc195c4f03 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Jan 2024 02:05:43.2465 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: G9Fk355MmxMTBmmRknahtmDKNc18thikG1IgA1lrrbUxEt3U0XnlPFHhFloJLE0keK4M7ajrlhG4xpscsyvHfMeB8fSti33SnGRY5Q/Elms= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR11MB8394 X-OriginatorOrg: intel.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,michael.d.kinney@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: moJRbX32nPfrbDlUxjcWHfNox7686176AA= Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=dJujO95q; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io Hi Ashraf, What is captured in the file? What PCD/VPD changes will invalidate the cache? Just the number and=20 type of PCD/VPD elements or their default values/sizes? How was this tested? Were all conditions that invalidate the cache tested? I ask because incremental build is a very important feature and if there is any logic error in the cache management of a file like this, it will cause unexpected behavior and developers will not trust incremental builds. Mike > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Ashraf > Ali S > Sent: Tuesday, January 16, 2024 11:55 PM > To: devel@edk2.groups.io > Cc: S, Ashraf Ali ; Chen, Christine > ; Rebecca Cran ; Liming Gao > ; Feng, Bob C ; Chan, > Amy ; Chaganty, Rangasai V > ; Solanki, Digant H > > Subject: [edk2-devel] [PATCH] BaseTools: Optimize GenerateByteArrayValue > and CollectPlatformGuids APIs >=20 > During the Incremental build GenerateByteArrayValue used to generate the > ByteArrayValue even when there is no change in the PCD/VPDs. which is > time consuming API based on the number of PCD/VPDs and SKU IDs. >=20 > The optimization is that GenerateByteArrayValue is used to store the > PcdRecordList in a JSON file for each of the arch. and during the > Incremental build this API will check if there is any change in the PCD > /VPDs then rest of the flow remains the same. if there is no change then > it will return the provious build data. >=20 > Flow: > during the 1st build PcdRecordList.json is not exists, PcdRecordList > will be dumped to json file. and it will copy the output.txt as well. > Note: as the output.txt are different for different Arch, so it will be > stored in the Arch folder. > During the Incremental build check if there is any change in PCD/VPD. > if there is a change in VPD/PCD then recreate the PcdRecordList.json. > and rest of the flow remains same. > if there is no change in VPD/PCD read the output.txt and return the data >=20 > Cc: Yuwei Chen > Cc: Rebecca Cran > Cc: Liming Gao > Cc: Bob Feng > Cc: Amy Chan > Cc: Sai Chaganty > Cc: Digant H Solanki > Signed-off-by: Ashraf Ali S > --- > .../Source/Python/AutoGen/WorkspaceAutoGen.py | 16 ++--- > .../Source/Python/Workspace/DscBuildData.py | 72 +++++++++++++++---- > 2 files changed, 64 insertions(+), 24 deletions(-) >=20 > diff --git a/BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py > b/BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py > index 160e3a3cd3..eec9280c8e 100644 > --- a/BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py > +++ b/BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py > @@ -160,22 +160,18 @@ class WorkspaceAutoGen(AutoGen): >=20 > def CollectPlatformGuids(self): > oriInfList =3D [] > - oriPkgSet =3D set() > - PlatformPkg =3D set() > + pkgSet =3D set() > for Arch in self.ArchList: > Platform =3D self.BuildDatabase[self.MetaFile, Arch, > self.BuildTarget, self.ToolChain] > oriInfList =3D Platform.Modules > for ModuleFile in oriInfList: > ModuleData =3D self.BuildDatabase[ModuleFile, > Platform._Arch, Platform._Target, Platform._Toolchain] > - oriPkgSet.update(ModuleData.Packages) > - for Pkg in oriPkgSet: > - Guids =3D Pkg.Guids > - GlobalData.gGuidDict.update(Guids) > + pkgSet.update(ModuleData.Packages) > if Platform.Packages: > - PlatformPkg.update(Platform.Packages) > - for Pkg in PlatformPkg: > - Guids =3D Pkg.Guids > - GlobalData.gGuidDict.update(Guids) > + pkgSet.update(Platform.Packages) > + for Pkg in pkgSet: > + Guids =3D Pkg.Guids > + GlobalData.gGuidDict.update(Guids) >=20 > @cached_property > def FdfProfile(self): > diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py > b/BaseTools/Source/Python/Workspace/DscBuildData.py > index 4768099343..740b8e22be 100644 > --- a/BaseTools/Source/Python/Workspace/DscBuildData.py > +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py > @@ -37,6 +37,8 @@ from functools import reduce > from Common.Misc import SaveFileOnChange > from Workspace.BuildClassObject import PlatformBuildClassObject, > StructurePcd, PcdClassObject, ModuleBuildClassObject > from collections import OrderedDict, defaultdict > +import json > +import shutil >=20 > def _IsFieldValueAnArray (Value): > Value =3D Value.strip() > @@ -56,6 +58,7 @@ def _IsFieldValueAnArray (Value): >=20 > PcdValueInitName =3D 'PcdValueInit' > PcdValueCommonName =3D 'PcdValueCommon' > +PcdRecordListName =3D 'PcdRecordList.json' >=20 > PcdMainCHeader =3D ''' > /** > @@ -1599,7 +1602,7 @@ class DscBuildData(PlatformBuildClassObject): > S_pcd_set =3D DscBuildData.OverrideByComm(S_pcd_set) >=20 > # Create a tool to caculate structure pcd value > - Str_Pcd_Values =3D self.GenerateByteArrayValue(S_pcd_set) > + Str_Pcd_Values =3D self.GenerateByteArrayValue(S_pcd_set, > RecordList) >=20 > if Str_Pcd_Values: > for (skuname, StoreName, PcdGuid, PcdName, PcdValue) in > Str_Pcd_Values: > @@ -2750,12 +2753,61 @@ class DscBuildData(PlatformBuildClassObject): > ccflags.add(item) > i +=3D1 > return ccflags > - def GenerateByteArrayValue (self, StructuredPcds): > + > + def GetStructurePcdSet (self, OutputValueFile): > + if not os.path.isfile(OutputValueFile): > + EdkLogger.error("GetStructurePcdSet", FILE_NOT_FOUND, > "Output.txt doesn't exist", ExtraData=3DOutputValueFile) > + return [] > + File =3D open (OutputValueFile, 'r') > + FileBuffer =3D File.readlines() > + File.close() > + > + #start update structure pcd final value > + StructurePcdSet =3D [] > + for Pcd in FileBuffer: > + PcdValue =3D Pcd.split ('|') > + PcdInfo =3D PcdValue[0].split ('.') > + StructurePcdSet.append((PcdInfo[0], PcdInfo[1], PcdInfo[2], > PcdInfo[3], PcdValue[2].strip())) > + return StructurePcdSet > + > + def GenerateByteArrayValue (self, StructuredPcds, PcdRecordList): > # > # Generate/Compile/Run C application to determine if there are > any flexible array members > # > if not StructuredPcds: > return > + # > + # If the output path doesn't exists then create it > + # > + if not os.path.exists(self.OutputPath): > + os.makedirs(self.OutputPath) > + > + PcdRecordListPath =3D os.path.join(self.OutputPath, self._Arch, > PcdRecordListName) > + PcdRecordOutputValueFile =3D os.path.join(self.OutputPath, > self._Arch, 'Output.txt') > + > + if not os.path.exists(os.path.dirname(PcdRecordListPath)): > + os.makedirs(os.path.dirname(PcdRecordListPath)) > + # > + # Check if the PcdRecordList.json exists or not > + # if exits then it might be a incremental build then check if > the PcdRecord list has been changed or not. > + # if changed then proceed further, if not changed then return > the stored data from earlier build > + # > + if os.path.isfile(PcdRecordListPath): > + with open(PcdRecordListPath, 'r') as file: > + file_content_str =3D file.read() > + if file_content_str: > + # Use json.loads to convert the string back to a > list > + file_content =3D json.loads(file_content_str) > + # Check if all PcdRecordList in record_set are > present in file_content > + # and if there are no extra PcdRecordList in > file_content > + if set(map(tuple, PcdRecordList)) =3D=3D set(map(tup= le, > file_content)): > + return > self.GetStructurePcdSet(PcdRecordOutputValueFile) > + # > + # 1st build, create the PcdRecordList.json > + # update the record as PCD Input has been changed in > incremental build > + # > + with open(PcdRecordListPath, 'w') as file: > + json.dump(PcdRecordList, file) >=20 > InitByteValue =3D "" > CApp =3D PcdMainCHeader > @@ -2832,8 +2884,6 @@ class DscBuildData(PlatformBuildClassObject): >=20 > CApp =3D CApp + PcdMainCEntry + '\n' >=20 > - if not os.path.exists(self.OutputPath): > - os.makedirs(self.OutputPath) > CAppBaseFileName =3D os.path.join(self.OutputPath, > PcdValueInitName) > SaveFileOnChange(CAppBaseFileName + '.c', CApp, False) >=20 > @@ -3042,17 +3092,11 @@ class DscBuildData(PlatformBuildClassObject): > if returncode !=3D 0: > EdkLogger.warn('Build', COMMAND_FAILURE, 'Can not > collect output from command: %s\n%s\n%s\n' % (Command, StdOut, StdErr)) >=20 > - #start update structure pcd final value > - File =3D open (OutputValueFile, 'r') > - FileBuffer =3D File.readlines() > - File.close() > + # Copy output file for each Arch > + shutil.copyfile(OutputValueFile, PcdRecordOutputValueFile) >=20 > - StructurePcdSet =3D [] > - for Pcd in FileBuffer: > - PcdValue =3D Pcd.split ('|') > - PcdInfo =3D PcdValue[0].split ('.') > - StructurePcdSet.append((PcdInfo[0], PcdInfo[1], PcdInfo[2], > PcdInfo[3], PcdValue[2].strip())) > - return StructurePcdSet > + # return structure pcd final value > + return self.GetStructurePcdSet(OutputValueFile) >=20 > @staticmethod > def NeedUpdateOutput(OutputFile, ValueCFile, StructureInput): > -- > 2.39.1.windows.1 >=20 >=20 >=20 >=20 >=20 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#114108): https://edk2.groups.io/g/devel/message/114108 Mute This Topic: https://groups.io/mt/103781798/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/19134562= 12/xyzzy [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-