From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web12.2532.1625111446057670553 for ; Wed, 30 Jun 2021 20:50:46 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=GEJw1u5+; spf=pass (domain: intel.com, ip: 134.134.136.24, mailfrom: bob.c.feng@intel.com) X-IronPort-AV: E=McAfee;i="6200,9189,10031"; a="208417559" X-IronPort-AV: E=Sophos;i="5.83,313,1616482800"; d="scan'208";a="208417559" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jun 2021 20:50:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,313,1616482800"; d="scan'208";a="489796525" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga001.jf.intel.com with ESMTP; 30 Jun 2021 20:50:37 -0700 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.2242.4; Wed, 30 Jun 2021 20:50:37 -0700 Received: from fmsmsx604.amr.corp.intel.com (10.18.126.84) 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.2242.4; Wed, 30 Jun 2021 20:50:36 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4 via Frontend Transport; Wed, 30 Jun 2021 20:50:36 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.177) 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.2242.4; Wed, 30 Jun 2021 20:50:08 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BdHyv4mfTHM8JBB66GvfASgVYqGQSaCD/WRr9QYDw/HC9aefTNDFTOMWJQ4AO+abJq6UjqAJZmr95685ZmP7i3Yr4iaqYxMv22icuvM2uMn2ddQb/p6SjyhAfaFFS1j96bC3Ue2QFEgjgMUkAu9I35Z0IiaFGtECk+l0otTyxYqz3BOP8OF8za7lu9ZH0KiMMFskvpxhE6ZNEqRlZJzLvHl2/TEUoD4jjOareY2cyOh/i7jhxX/3wDsrp5f88pQmb8DXIbLTyALVBiJrkBAi6P1bxw1Cfj9E5F7HVkVmo4VvW3cm1ILJEaTMb1OYpALwmXmpDqrHow4QWYXGRR6b+Q== 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-SenderADCheck; bh=1QniKZslHNhIFIIwwCvuAp1j4BOgQZ57T4nU3qM3fSE=; b=IS1g+V8R8oSbIuTeHBb4fZM03Tdunxljw0qZyV6Uq+4OrRlCj2zvaAgA9idbdjpfvMJ78+onWoe4n+w16jvKcpT8JwedIshQmAhX2E5ReZZIFT31x+Y2dMHv3Nrbh+RdVYWf0TYtSawBUvUVZXgak9EHhop27wgPGVE6ArC70v801DwG4yRbtZDcPmbKYjVS04F2MWCJwmoiFsvkiaqMeZKDmWYnFSjcq8gcHK+x9T7z8ChJ4irHNITP1wptShUiH1rX99hoWbLMD9Fk6dezT/itKEWhzt6oP28nl2KZPZf/ftQe5Zl+27rms4ARElfS81cSggSBKJxJbQlaZNz1dg== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1QniKZslHNhIFIIwwCvuAp1j4BOgQZ57T4nU3qM3fSE=; b=GEJw1u5+Xj3n5os1Mqyt/Q3hHXk8TC0vmHGQN0NXpdq4n5oU1ZFom1SRwQ4CGlIqPLCWzIfBsoZPz4FEFxVDg+finQplloqEIpANdOQpXeRCs1Mtspa5WjNq1NNzGp0B6gWzAKS0PUilv7SDHhJKjavccqfboObrswZwL4NyoCw= Received: from DM6PR11MB4073.namprd11.prod.outlook.com (2603:10b6:5:19f::22) by DM6PR11MB4595.namprd11.prod.outlook.com (2603:10b6:5:2ac::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.18; Thu, 1 Jul 2021 03:50:04 +0000 Received: from DM6PR11MB4073.namprd11.prod.outlook.com ([fe80::585b:8bbc:602e:fb36]) by DM6PR11MB4073.namprd11.prod.outlook.com ([fe80::585b:8bbc:602e:fb36%5]) with mapi id 15.20.4264.027; Thu, 1 Jul 2021 03:50:04 +0000 From: "Bob Feng" To: "devel@edk2.groups.io" , "Feng, Bob C" , Liming Gao , "Chen, Christine" CC: "Kinney, Michael D" , "Desimone, Nathaniel L" Subject: Re: [edk2-devel] [Patch V2] BaseTools: Enable the flag to treat dynamic pcd as dynamicEx Thread-Topic: [edk2-devel] [Patch V2] BaseTools: Enable the flag to treat dynamic pcd as dynamicEx Thread-Index: AQHXXBEaVcfqJv4+h0mkNnKuS8Tq8qstn/2Q Date: Thu, 1 Jul 2021 03:50:04 +0000 Message-ID: References: <16867BA05B2FF24C.10003@groups.io> In-Reply-To: <16867BA05B2FF24C.10003@groups.io> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.55.46.54] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 3e4077a9-7326-4c71-a6ad-08d93c434fc4 x-ms-traffictypediagnostic: DM6PR11MB4595: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: ok5gTgQvb1yHwC9Izrk7Mz8vJSgbrfjJFHWBqFL9ewWlji815MgDAeCqdyaiMXscv/BKR6wbpLQ11UKUw4KuBjYPonV2l6jOu7aKh+B43Zm2IHskgKMUgIPW05CTayu3IcFviVhP3YNq1BygyZrvxYI4jA69cmiF0i6AZZHfd09BZAM2myTNOwofkZeCs9JVN44pZh6usOI3sIot7csinGmp93/qK0Pyh4Az78NPXmsQlWDbcC8SdSKOgaHlYSEL9CwxqdL4x9BsDEsdi7xM1EqyK0QQMAFuy+QfzSLdZL6PR9poEKUd+2Ps3Zix5JBbO/YyaDQjnHmgEBrKVMMJmAua4SK9ry+TpOXxCxd4RX9iUrzeMpu+mYH6ekdXFmS9Bs0lySP18qNdhGbj8255MEviJdT7AGQ4K1cJREh4fZu59tOfhWkNYWrRo7Eqi4JaTdeHgNbTztPqJv8zl76fqm9HQEAVqoT+2c4NAFCPhX8qNCX1wHtKaN1bfWCUpBr+evfnyHT76qgvTL5thBhzZcf6czpMOEf9i8meG47WF9uZVwy1NCBRQfocvvknc64VE4QIBn+KHz70PRo8Bv9NWTfi9NFxiNWypsAqo6BcXwdFCXoYlQZGvYLa+a6UM5s3CjaXJMvdJGVV8iMLmW731frM3wk/r4X/hnPJHtb2+uPtHoATFMe1xBW6nq5u3ka4MOjq0wyXO09hJAk/U1MxZvdbz0df8JLbtO47eW/FbF20Zsdw6KQJoFnX1XyNxjMWDCpDs+OLTJuYx4c9fGQHtacbLvL39dnZTZbQGp/onrnXgtOM6WtBTtAFrbAQUj9c+zAiush10WAylVwgEjTEsyxGWl3HVBk6BF4cSwwSFy4= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR11MB4073.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(376002)(346002)(396003)(39860400002)(366004)(136003)(8676002)(8936002)(83380400001)(966005)(33656002)(478600001)(6506007)(71200400001)(26005)(38100700002)(186003)(6636002)(7696005)(122000001)(53546011)(2906002)(316002)(66946007)(55016002)(86362001)(9686003)(107886003)(110136005)(54906003)(66556008)(64756008)(30864003)(66476007)(76116006)(5660300002)(52536014)(66446008)(4326008)(21314003);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?j6j5Y+h46rMOoTz3/ccLBrniowom5Bss97qrIIeA/NKG2ghcCaJvpLbNQLz1?= =?us-ascii?Q?/IuiEI5/GTSwsTRhwEDC8Vpf34jSXhcsBQcV4YhScHUTXP66BuaigdyTX35L?= =?us-ascii?Q?BWagprB+7QQRUuCUmC24KR0Uqo9jlR2OLW2ACq1obVZ7sEXSGXu2FAeVgL1U?= =?us-ascii?Q?f3Sp2DzWr8yYR/GEULiYiMfWw0ygnktPsibmT61r0qwfR8ukvBDvTmIkPcxx?= =?us-ascii?Q?hU/Lo1iutU4QaVzZd7iex3Nn0ankFEEuNfgSHUBMQ2GI6rM4NhuL566LiEJk?= =?us-ascii?Q?SVPfEVURRMT2ONxcOjU2B4eN+lcKnReu3bMrAOSLrx3idrIZg1P+5MVV3tCy?= =?us-ascii?Q?fMRfrTZJB28kBzYWViRhU7PxbRkWP+7IRTxuQ3YsJW7jucVLlHPWeNLlq5Xm?= =?us-ascii?Q?Xd8W+JzfLYF7qXtO45D4lNDXFlIRaSXylzdXGnlRcfcbhFtc579/vCMwhKPX?= =?us-ascii?Q?v5gHhukUZ/1wYmMn7FDj6E2jSpT+ApyZu44wbKhrNAo6vzbDAbgGOo7yLYr8?= =?us-ascii?Q?xy0XHNiZbqLj4seUKVL2tVgp/A+qWK6elSzFJ4e0C6CgE5rz2wuaTG/X6TU3?= =?us-ascii?Q?9vWTTtSPyYNTAJZstCZwW1gkmeOxnHExpgkrJKf9qSlsVh2KaAv0umfzuGWf?= =?us-ascii?Q?sWimOGEtLOaTIo5V8jM6CQZyEeRN2iq35VIGKG3D5JIwZnjuW6KLwh671bqk?= =?us-ascii?Q?cbLW1WNfQXFpCOZBDVdhEi1x+zlvsjLa9winaEo4puCsI2gqpa1pm2XYxEbk?= =?us-ascii?Q?PscZF+ZOFMCkzXhhbx/BqsIrL8mvhsaPGX42v5ZYsdpw9AWZ6ZZdOcnUO/ra?= =?us-ascii?Q?0nrIs3e4l0unOUl7vc8z5XlSObiRHryLZSE0nw5uRcCGHe9gn1fJ0XSp1EqO?= =?us-ascii?Q?r8q1jiOK4yDqtud68cG4Av6cfMeNpaQASbalaRyQLFzapwXluoidK0UHZnwL?= =?us-ascii?Q?xCILeRnFyURf/xppsWvAkUe01hZTEJJvY5yll5OLyphwIFCsuWi22pbn3ULp?= =?us-ascii?Q?K0FfMtYj4+o8XmLaUvULD1b/GYxyLA7wudFkCgF0Diq5dWV6xy2I+H6yaGsp?= =?us-ascii?Q?9iE/rk7NBuVJD5HdiHTIUHu1KJs4Mx2AlP2bPXCQcCmYGvhoy1lDBtVHtKf4?= =?us-ascii?Q?zS2icYMIBLvjDcQHof9sDw1ZQjTX/mUxqCsTr+wqucFOlR45QssHDSOmdIm1?= =?us-ascii?Q?AEkrME2kC+L6YHodEVkZFyMbr24mqS7IISfRyMCMaHp92BwfMn8+94BH5uEO?= =?us-ascii?Q?mitwodK/7eg1HdJ0ndAcLH1jNZQDgJAH1oKv+ksd7MYconWXFPoZFRqn1m29?= =?us-ascii?Q?2v4=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB4073.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3e4077a9-7326-4c71-a6ad-08d93c434fc4 X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Jul 2021 03:50:04.7399 (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: V0Zo0CO6KigffRmHCWy71TUUgWlj38LH7nRVLMaRdXUkMgaAW5RlXjn3ChgJ7t4tOwUKiX2/aZ19S9X0GkMRxQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB4595 Return-Path: bob.c.feng@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Liming and Christine, Do you have any comments on this patch? Thanks, Bob=20 -----Original Message----- From: devel@edk2.groups.io On Behalf Of Bob Feng Sent: Tuesday, June 8, 2021 10:50 AM To: devel@edk2.groups.io Cc: Liming Gao ; Chen, Christine ; Kinney, Michael D ; Desimone, Nathaniel= L Subject: [edk2-devel] [Patch V2] BaseTools: Enable the flag to treat dynami= c pcd as dynamicEx Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1688 In order to support binary build, build tool add a flag to convert type of = Dynamic Pcd to DynamicEx Pcd User can append -D PCD_DYNAMIC_AS_DYNAMICEX to build command to enable this= function. Also, user can add "PCD_DYNAMIC_AS_DYNAMICEX =3D TRUE/FALSE" to the defines section of Dsc file to enable this function. PCD_DYNAMIC_AS_DYNAMICEX is a new reserved key word for this function. Signed-off-by: Bob Feng Cc: Liming Gao Cc: Yuwei Chen Cc: Michael D Kinney Cc: Nate DeSimone ---Correct Liming's emai= l address. BaseTools/Source/Python/Common/DataType.py | 1 + .../Python/Workspace/BuildClassObject.py | 153 ++++++++---------- .../Source/Python/Workspace/DecBuildData.py | 15 +- .../Source/Python/Workspace/DscBuildData.py | 19 +-- .../Source/Python/Workspace/InfBuildData.py | 15 +- 5 files changed, 73 insertions(+), 130 deletions(-) diff --git a/BaseTools/Source/Python/Common/DataType.py b/BaseTools/Source/= Python/Common/DataType.py index fb88f20cc4..4e9c9e34af 100644 --- a/BaseTools/Source/Python/Common/DataType.py +++ b/BaseTools/Source/Python/Common/DataType.py @@ -402,10 +402,11 @@ TAB_DSC_DEFINES_DSC_SPECIFICATION =3D 'DSC_SPECIFICAT= ION' TAB_DSC_DEFINES_OUTPUT_DIRECTORY =3D 'OUTPUT_DIRECTORY' TAB_DSC_DEFINES_SU= PPORTED_ARCHITECTURES =3D 'SUPPORTED_ARCHITECTURES' TAB_DSC_DEFINES_BUILD_T= ARGETS =3D 'BUILD_TARGETS' TAB_DSC_DEFINES_SKUID_IDENTIFIER =3D 'SKUID_IDEN= TIFIER' TAB_DSC_DEFINES_PCD_INFO_GENERATION =3D 'PCD_INFO_GENERATION'+TAB_D= SC_DEFINES_PCD_DYNAMIC_AS_DYNAMICEX =3D 'PCD_DYNAMIC_AS_DYNAMICEX' TAB_DSC_= DEFINES_PCD_VAR_CHECK_GENERATION =3D 'PCD_VAR_CHECK_GENERATION' TAB_DSC_DEF= INES_FLASH_DEFINITION =3D 'FLASH_DEFINITION' TAB_DSC_DEFINES_BUILD_NUMBER = =3D 'BUILD_NUMBER' TAB_DSC_DEFINES_MAKEFILE_NAME =3D 'MAKEFILE_NAME' TAB_DS= C_DEFINES_BS_BASE_ADDRESS =3D 'BsBaseAddress'diff --git a/BaseTools/Source/= Python/Workspace/BuildClassObject.py b/BaseTools/Source/Python/Workspace/Bu= ildClassObject.py index ebb65fc2fe..88a1d1582c 100644 --- a/BaseTools/Source/Python/Workspace/BuildClassObject.py +++ b/BaseTools/Source/Python/Workspace/BuildClassObject.py @@ -10,11 +10,13 @@ from Common.DataType import * import collections impor= t re from collections import OrderedDict from Common.Misc import CopyDict,A= rrayIndex import copy+from CommonDataClass.DataClass import * import Common= .EdkLogger as EdkLogger+import Common.GlobalData as GlobalData from Common.= BuildToolError import OPTION_VALUE_INVALID from Common.caching import cache= d_property StructPattern =3D re.compile(r'[_a-zA-Z][0-9A-Za-z_\[\]]*$') ##= PcdClassObject@@ -396,10 +398,71 @@ class StructurePcd(PcdClassObject): new_pcd.ValueChain =3D {item for item in self.ValueChain} = return new_pcd LibraryClassObject =3D namedtuple('LibraryClassObject', ['L= ibraryClass','SupModList']) +class BuildData(object):+ # dict used to co= nvert PCD type in database to string used by build tool++ _PCD_TYPE_STRI= NG_ =3D {+ MODEL_PCD_FIXED_AT_BUILD : TAB_PCDS_FIXED_AT_BUI= LD,+ MODEL_PCD_PATCHABLE_IN_MODULE : TAB_PCDS_PATCHABLE_IN_MODUL= E,+ MODEL_PCD_FEATURE_FLAG : TAB_PCDS_FEATURE_FLAG,+ = MODEL_PCD_DYNAMIC : TAB_PCDS_DYNAMIC,+ MODEL_PCD_= DYNAMIC_DEFAULT : TAB_PCDS_DYNAMIC,+ MODEL_PCD_DYNAMIC_HII = : TAB_PCDS_DYNAMIC_HII,+ MODEL_PCD_DYNAMIC_VPD = : TAB_PCDS_DYNAMIC_VPD,+ MODEL_PCD_DYNAMIC_EX : TAB_P= CDS_DYNAMIC_EX,+ MODEL_PCD_DYNAMIC_EX_DEFAULT : TAB_PCDS_DYNAMI= C_EX,+ MODEL_PCD_DYNAMIC_EX_HII : TAB_PCDS_DYNAMIC_EX_HII,+= MODEL_PCD_DYNAMIC_EX_VPD : TAB_PCDS_DYNAMIC_EX_VPD,+ }+= + def UpdatePcdTypeDict(self):+ if GlobalData.gCommandLineDefines= .get(TAB_DSC_DEFINES_PCD_DYNAMIC_AS_DYNAMICEX,"FALSE").upper() =3D=3D "TRUE= ":+ self._PCD_TYPE_STRING_ =3D {+ MODEL_PCD_FIXED= _AT_BUILD : TAB_PCDS_FIXED_AT_BUILD,+ MODEL_PCD_PAT= CHABLE_IN_MODULE : TAB_PCDS_PATCHABLE_IN_MODULE,+ MODEL_= PCD_FEATURE_FLAG : TAB_PCDS_FEATURE_FLAG,+ MODEL_= PCD_DYNAMIC : TAB_PCDS_DYNAMIC_EX,+ MODEL_PC= D_DYNAMIC_DEFAULT : TAB_PCDS_DYNAMIC_EX,+ MODEL_PCD_= DYNAMIC_HII : TAB_PCDS_DYNAMIC_EX_HII,+ MODEL_PC= D_DYNAMIC_VPD : TAB_PCDS_DYNAMIC_EX_VPD,+ MODEL_= PCD_DYNAMIC_EX : TAB_PCDS_DYNAMIC_EX,+ MODEL_PC= D_DYNAMIC_EX_DEFAULT : TAB_PCDS_DYNAMIC_EX,+ MODEL_PCD_= DYNAMIC_EX_HII : TAB_PCDS_DYNAMIC_EX_HII,+ MODEL_PC= D_DYNAMIC_EX_VPD : TAB_PCDS_DYNAMIC_EX_VPD,+ }++ ## = Convert the class to a string+ #+ # Convert member MetaFile of the c= lass to a string+ #+ # @retval string Formatted String+ #+ def= __str__(self):+ return str(self.MetaFile)++ ## Override __eq__ f= unction+ #+ # Check whether ModuleBuildClassObjects are the same+ = #+ # @retval False The two ModuleBuildClassObjects are different+ # @= retval True The two ModuleBuildClassObjects are the same+ #+ def __e= q__(self, Other):+ return self.MetaFile =3D=3D Other++ ## Overrid= e __hash__ function+ #+ # Use MetaFile as key in hash table+ #+ = # @retval string Key for hash table+ #+ def __hash__(self):+ = return hash(self.MetaFile)+ ## ModuleBuildClassObject # # This Class define= s ModuleBuildClass # # @param object: Inherited from object c= lass@@ -440,11 +503,11 @@ LibraryClassObject =3D namedtuple('LibraryClassOb= ject', ['LibraryClass','SupModLis # { [(PcdCName, PcdGuidCName)] : PcdClassObje= ct} # @var BuildOptions: To store value for BuildOptions, it is a= set structure as # { [BuildOptionKey] : Build= OptionValue} # @var Depex: To store value for Depex #-clas= s ModuleBuildClassObject(object):+class ModuleBuildClassObject(BuildData): = def __init__(self): self.AutoGenVersion =3D 0 = self.MetaFile =3D '' self.BaseName = =3D '' self.ModuleType =3D ''@@ -474,38 +537,10 @@ cla= ss ModuleBuildClassObject(object): self.BuildOptions =3D {} self.Depex = =3D {} self.StrPcdSet =3D [] self.StrP= cdOverallValue =3D {} - ## Convert the class to a string- #- = # Convert member MetaFile of the class to a string- #- # @retval st= ring Formatted String- #- def __str__(self):- return str(self.= MetaFile)-- ## Override __eq__ function- #- # Check whether Module= BuildClassObjects are the same- #- # @retval False The two ModuleBuil= dClassObjects are different- # @retval True The two ModuleBuildClassObj= ects are the same- #- def __eq__(self, Other):- return self.Me= taFile =3D=3D Other-- ## Override __hash__ function- #- # Use Meta= File as key in hash table- #- # @retval string Key for hash table- = #- def __hash__(self):- return hash(self.MetaFile)- ## PackageBu= ildClassObject # # This Class defines PackageBuildClass # # @param object: = Inherited from object class@@ -525,11 +560,11 @@ class ModuleBuildCl= assObject(object): # @var LibraryClasses: To store value for LibraryClasses, it is a set str= ucture as # { [LibraryClassName] : LibraryClassInfFil= e } # @var Pcds: To store value for Pcds, it is a set structure = as # { [(PcdCName, PcdGuidCName)] : PcdClassObject} #= -class PackageBuildClassObject(object):+class PackageBuildClassObject(Build= Data): def __init__(self): self.MetaFile =3D '' = self.PackageName =3D '' self.Guid = =3D '' self.Version =3D ''@@ -539,38 +574,10 = @@ class PackageBuildClassObject(object): self.Guids =3D {} self.Includes = =3D [] self.LibraryClasses =3D {} self.Pcds= =3D {} - ## Convert the class to a string- #- = # Convert member MetaFile of the class to a string- #- # @retval st= ring Formatted String- #- def __str__(self):- return str(self.= MetaFile)-- ## Override __eq__ function- #- # Check whether Packag= eBuildClassObjects are the same- #- # @retval False The two PackageBu= ildClassObjects are different- # @retval True The two PackageBuildClass= Objects are the same- #- def __eq__(self, Other):- return self= .MetaFile =3D=3D Other-- ## Override __hash__ function- #- # Use M= etaFile as key in hash table- #- # @retval string Key for hash table-= #- def __hash__(self):- return hash(self.MetaFile)- ## Platfo= rmBuildClassObject # # This Class defines PlatformBuildClass # # @param obj= ect: Inherited from object class@@ -595,11 +602,11 @@ class Packag= eBuildClassObject(object): # @var Pcds: To store value for Pcds, it is a set structure a= s # { [(PcdCName, PcdGuidCName)] : PcdClassObject }= # @var BuildOptions: To store value for BuildOptions, it is a set str= ucture as # { [BuildOptionKey] : BuildOptionValue }= #-class PlatformBuildClassObject(object):+class PlatformBuildClassObject(B= uildData): def __init__(self): self.MetaFile =3D= '' self.PlatformName =3D '' self.Guid = =3D '' self.Version =3D ''@@ -614,33 +621= ,5 @@ class PlatformBuildClassObject(object): self.LibraryInstances =3D [] self.LibraryClasses = =3D {} self.Libraries =3D {} self.Pcds= =3D {} self.BuildOptions =3D {}-- = ## Convert the class to a string- #- # Convert member MetaFile of t= he class to a string- #- # @retval string Formatted String- #- = def __str__(self):- return str(self.MetaFile)-- ## Override __eq= __ function- #- # Check whether PlatformBuildClassObjects are the sam= e- #- # @retval False The two PlatformBuildClassObjects are different= - # @retval True The two PlatformBuildClassObjects are the same- #- = def __eq__(self, Other):- return self.MetaFile =3D=3D Other-- = ## Override __hash__ function- #- # Use MetaFile as key in hash table= - #- # @retval string Key for hash table- #- def __hash__(self)= :- return hash(self.MetaFile)diff --git a/BaseTools/Source/Python/Wo= rkspace/DecBuildData.py b/BaseTools/Source/Python/Workspace/DecBuildData.py index 30826a3cea..da7a52c5d0 100644 --- a/BaseTools/Source/Python/Workspace/DecBuildData.py +++ b/BaseTools/Source/Python/Workspace/DecBuildData.py @@ -19,24 +19,10 @@ from re import compile # # This class is used to retrieve information stored in database and con= vert them # into PackageBuildClassObject form for easier use for AutoGen. #= class DecBuildData(PackageBuildClassObject):- # dict used to convert PC= D type in database to string used by build tool- _PCD_TYPE_STRING_ =3D {= - MODEL_PCD_FIXED_AT_BUILD : TAB_PCDS_FIXED_AT_BUILD,- = MODEL_PCD_PATCHABLE_IN_MODULE : TAB_PCDS_PATCHABLE_IN_MODULE,- = MODEL_PCD_FEATURE_FLAG : TAB_PCDS_FEATURE_FLAG,- MODEL_= PCD_DYNAMIC : TAB_PCDS_DYNAMIC,- MODEL_PCD_DYNAMIC_D= EFAULT : TAB_PCDS_DYNAMIC,- MODEL_PCD_DYNAMIC_HII = : TAB_PCDS_DYNAMIC_HII,- MODEL_PCD_DYNAMIC_VPD : TAB_P= CDS_DYNAMIC_VPD,- MODEL_PCD_DYNAMIC_EX : TAB_PCDS_DYNAM= IC_EX,- MODEL_PCD_DYNAMIC_EX_DEFAULT : TAB_PCDS_DYNAMIC_EX,- = MODEL_PCD_DYNAMIC_EX_HII : TAB_PCDS_DYNAMIC_EX_HII,- M= ODEL_PCD_DYNAMIC_EX_VPD : TAB_PCDS_DYNAMIC_EX_VPD,- } # di= ct used to convert part of [Defines] to members of DecBuildData directly = _PROPERTY_ =3D { # # Required Fields@@ -66,10 +52,11 @@ c= lass DecBuildData(PackageBuildClassObject): self._Bdb =3D BuildDataBase self._Arch =3D Arch se= lf._Target =3D Target self._Toolchain =3D Toolchain self._C= lear()+ self.UpdatePcdTypeDict() ## XXX[key] =3D value def = __setitem__(self, key, value): self.__dict__[self._PROPERTY_[key]] = =3D value diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/= BaseTools/Source/Python/Workspace/DscBuildData.py index 5f07d3e75c..4d5b1ad4d9 100644 --- a/BaseTools/Source/Python/Workspace/DscBuildData.py +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py @@ -177,24 +177,10 @@ def GetDependencyList(FileStack, SearchPathList): DependencyList =3D list(DependencySet) # remove duplicate ones r= eturn DependencyList class DscBuildData(PlatformBuildClassObject):- # d= ict used to convert PCD type in database to string used by build tool- _= PCD_TYPE_STRING_ =3D {- MODEL_PCD_FIXED_AT_BUILD : TAB_PCDS= _FIXED_AT_BUILD,- MODEL_PCD_PATCHABLE_IN_MODULE : TAB_PCDS_PATCH= ABLE_IN_MODULE,- MODEL_PCD_FEATURE_FLAG : TAB_PCDS_FEATUR= E_FLAG,- MODEL_PCD_DYNAMIC : TAB_PCDS_DYNAMIC,- = MODEL_PCD_DYNAMIC_DEFAULT : TAB_PCDS_DYNAMIC,- MODEL_PCD_= DYNAMIC_HII : TAB_PCDS_DYNAMIC_HII,- MODEL_PCD_DYNAMIC_V= PD : TAB_PCDS_DYNAMIC_VPD,- MODEL_PCD_DYNAMIC_EX = : TAB_PCDS_DYNAMIC_EX,- MODEL_PCD_DYNAMIC_EX_DEFAULT : TA= B_PCDS_DYNAMIC_EX,- MODEL_PCD_DYNAMIC_EX_HII : TAB_PCDS_DYN= AMIC_EX_HII,- MODEL_PCD_DYNAMIC_EX_VPD : TAB_PCDS_DYNAMIC_E= X_VPD,- } # dict used to convert part of [Defines] to members of Ds= cBuildData directly _PROPERTY_ =3D { # # Required Field= s@@ -240,11 +226,11 @@ class DscBuildData(PlatformBuildClassObject): self._ToolChainFamily =3D None self._Clear() self.= WorkspaceDir =3D os.getenv("WORKSPACE") if os.getenv("WORKSPACE") else "" = self.DefaultStores =3D None self.SkuIdMgr =3D SkuClass(self.= SkuName, self.SkuIds)-+ self.UpdatePcdTypeDict() @property d= ef OutputPath(self): if os.getenv("WORKSPACE"): return = os.path.join(os.getenv("WORKSPACE"), self.OutputDirectory, self._Target + "= _" + self._Toolchain, PcdValueInitName) else:@@ -409,10 +395,13 @@ = class DscBuildData(PlatformBuildClassObject): try: uuid.UUID(Record[2]) = except: EdkLogger.error("build", FORMAT_INVALID, "I= nvalid GUID format for VPD_TOOL_GUID", File=3Dself.MetaFile) = self._VpdToolGuid =3D Record[2]+ elif Name =3D=3D TAB_DSC_DEFI= NES_PCD_DYNAMIC_AS_DYNAMICEX:+ if TAB_DSC_DEFINES_PCD_DYNAMI= C_AS_DYNAMICEX not in gCommandLineDefines:+ gCommandLine= Defines[TAB_DSC_DEFINES_PCD_DYNAMIC_AS_DYNAMICEX] =3D Record[2].strip() = elif Name in self: self[Name] =3D Record[2] = # set _Header to non-None in order to avoid database re-querying = self._Header =3D 'DUMMY' diff --git a/BaseTools/Source/Python/Workspace/Inf= BuildData.py b/BaseTools/Source/Python/Workspace/InfBuildData.py index 7675b0ea00..45b8ef4716 100644 --- a/BaseTools/Source/Python/Workspace/InfBuildData.py +++ b/BaseTools/Source/Python/Workspace/InfBuildData.py @@ -57,24 +57,10 @@ def _PpiValue(CName, PackageList, Inffile =3D None): # # This class is used to retrieve information stored in database and con= vert them # into ModuleBuildClassObject form for easier use for AutoGen. # = class InfBuildData(ModuleBuildClassObject):- # dict used to convert PCD = type in database to string used by build tool- _PCD_TYPE_STRING_ =3D {- = MODEL_PCD_FIXED_AT_BUILD : TAB_PCDS_FIXED_AT_BUILD,- = MODEL_PCD_PATCHABLE_IN_MODULE : TAB_PCDS_PATCHABLE_IN_MODULE,- = MODEL_PCD_FEATURE_FLAG : TAB_PCDS_FEATURE_FLAG,- MODEL_PC= D_DYNAMIC : TAB_PCDS_DYNAMIC,- MODEL_PCD_DYNAMIC_DEF= AULT : TAB_PCDS_DYNAMIC,- MODEL_PCD_DYNAMIC_HII : = TAB_PCDS_DYNAMIC_HII,- MODEL_PCD_DYNAMIC_VPD : TAB_PCD= S_DYNAMIC_VPD,- MODEL_PCD_DYNAMIC_EX : TAB_PCDS_DYNAMIC= _EX,- MODEL_PCD_DYNAMIC_EX_DEFAULT : TAB_PCDS_DYNAMIC_EX,- = MODEL_PCD_DYNAMIC_EX_HII : TAB_PCDS_DYNAMIC_EX_HII,- MOD= EL_PCD_DYNAMIC_EX_VPD : TAB_PCDS_DYNAMIC_EX_VPD,- } # dict= used to convert part of [Defines] to members of InfBuildData directly = _PROPERTY_ =3D { # # Required Fields@@ -152,10 +138,11 @@ c= lass InfBuildData(ModuleBuildClassObject): self._GuidsUsedByPcd =3D OrderedDict() self._GuidComments = =3D None self._PcdComments =3D None self._BuildOptions =3D = None self._DependencyFileList =3D None+ self.UpdatePcdTypeDi= ct() self.LibInstances =3D [] self.ReferenceModules =3D set= () def SetReferenceModule(self,Module): self.ReferenceModules.= add(Module)--=20 2.29.1.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D Groups.io Links: You receive all messages sent to this group. View/Reply Online (#76176): https://edk2.groups.io/g/devel/message/76176 Mute This Topic: https://groups.io/mt/83388055/1768742 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [bob.c.feng@intel.com] -= =3D-=3D-=3D-=3D-=3D-=3D