From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web10.3181.1623718350375759107 for ; Mon, 14 Jun 2021 17:52:30 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=xc/yV1Fk; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: bob.c.feng@intel.com) IronPort-SDR: BvG8lLHQhtz3Hf9trtB8POyojF1rE3UP9QUz0WX6q6HSB4wpqQO5xePgiiS+SWZJI+8qT0ysT/ Bi4sUMcTKaLg== X-IronPort-AV: E=McAfee;i="6200,9189,10015"; a="186275451" X-IronPort-AV: E=Sophos;i="5.83,273,1616482800"; d="scan'208";a="186275451" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jun 2021 17:52:29 -0700 IronPort-SDR: 5jRhlqEIthetazhSqlriJufXYtdHpol/oKpedCaLeQQftKrEZaoqsVIRoAiy+Jtls9aF/7VcJq dbRhhMwvDvjQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,273,1616482800"; d="scan'208";a="442390819" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by orsmga007.jf.intel.com with ESMTP; 14 Jun 2021 17:52:29 -0700 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) 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; Mon, 14 Jun 2021 17:52:28 -0700 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx609.amr.corp.intel.com (10.18.126.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Mon, 14 Jun 2021 17:52:28 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4 via Frontend Transport; Mon, 14 Jun 2021 17:52:28 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.176) 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; Mon, 14 Jun 2021 17:52:28 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CgFykajoGCrptugiil1tNn+cQny63l+4fvNIL8HYKHBHdEaoO9VP9ftkC3KtxlBfcsAt97I1sXSipeYh1XrhaTw1CTgXfRrmmtxL1zCwfF6v1xpgPMlnQXTBs5E9MfB5bN3C7sL9iPIPrc6f/6qSiQrnGJiy5jn8xb0cUn3L40RCegsm/G5JBDoB3pOvutDzlpXa1qzfF5/sDmeJnRpYSbC+xo9cJ6os8HCbsz0ZNMZoOjlT9X2Rb/Dd1kEFh7cO7B0WpeEuld7TjG7pjOprQqaX8CKUNhsfvA1XXiLx+Slc0Xz6cxrKEFHd+zCUT6q5HHKi81tSeKgacAqjv0FzZg== 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=BZSwlzR1XzkUQs9ZBzElQ7sKXJjCSgsoEdbAlwOM4J4=; b=EXE4kJKLnLjBim1y6hFOtm2tOIAnjcqPNLqJnZAqgswiAYCM03UmQO0hnU44dd4QU02JSVJJwTVr2k6M87Bp75YjwvGc3LfCCnWzQ3L4RWaRM255OSO4ub7j933NGTB+ODLHZ+151s2gtFE78BJx/6kvsL5MbqraQV5uWOHxpVwQ7oRjpXLJ/nLxzWRW2Y0rsvSc9XzoVp9MmhKPBMhyg9vhLywr0ZuxuP6+ygLzoz1EES87LJORL3kQb3LhjnrFOWNnWlOsH5Veulcx8jFpSmEvV2Mjk4+WmQaIoQgt1JakqHYnfuPdY0CwJspVv8iGDppgZyFaRYerjPfV7h2mCw== 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=BZSwlzR1XzkUQs9ZBzElQ7sKXJjCSgsoEdbAlwOM4J4=; b=xc/yV1FkuUMoYs2u4vGvn4kzDRQ23W1HOLEnS5S2DftMnimEb0sEz6L1SoO6dhWk+Zmo9Pm2ToMuAkY6bBaPl8IgphKkXM75NU3NLEhQdmgcqgbYoqqg6rv+ArSqIoVzG7zpz6HulB3/ZQb1niIVVzEK7xW0pmDIroCOSKFKnPE= Received: from DM6PR11MB4073.namprd11.prod.outlook.com (2603:10b6:5:19f::22) by DM6PR11MB4756.namprd11.prod.outlook.com (2603:10b6:5:2a7::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.20; Tue, 15 Jun 2021 00:52:27 +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.4219.025; Tue, 15 Jun 2021 00:52:27 +0000 From: "Bob Feng" To: "devel@edk2.groups.io" , "Feng, Bob C" CC: Liming Gao , "Chen, Christine" , "Kinney, Michael D" , "Desimone, Nathaniel L" , Mike Turner 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+h0mkNnKuS8Tq8qsUSR+A Date: Tue, 15 Jun 2021 00:52:26 +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.52] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 31b1dbf0-f0ce-4b37-0c57-08d92f97d8a6 x-ms-traffictypediagnostic: DM6PR11MB4756: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: h6huwQwy/IHlaWHi01JEgaH1wBVGy5QLdMiwwNh6IF3lejs+n7LvsXRVw4iIGIdI8ts8RCbT0eGsSJT9roqN/VLEVniKTsDssBK2vhIMRbD1nmz2wQ5mLsBKt0WpE787VXLr4U28NyrYebQDaY/W2lr+rzy/gqJwQEGkldWzoLkJwEeQgqnbAeFlfTaAGx3iz0/1dC+3WAqQ1hY6oGG9goxQY4xP1a2zQ8PXslQLjUGWkB8ih+6oEhRGHT0KPfDdFoPx1hYWEpA1U7pLradOR197vHu+m4zhiTiAN+0uIb0mJCvG1K5/lWr+RwIbnwQIWLF7ysM9QqTolGqUWtt/M9r9a7p4oCd+gCf8YGM0TMZ2j02ptOVYqjXfEvXU5YTCffwiuCFLnIzL+ePrZkxkIvqLzQ9zXhf4hC/dL9nxhWfwb8Xfd9M5dHR+eyY3GIdjUILbLO1Z6bdwk6KZ4o/QkCGlpYJdyjyNT5ddzR/n3M1dEbKLYtyJuob7ib8EuWIGPfMTvucZWzoajOkHEJ97UgR7zJDEUIY6P59OIwXlZl63cKHrFdW2thsCylpL1E5Kh+duwnaK3QQx6w3WUjYawZc/7XDx7oWyNqgQAF9rvKLNmYFCF4+Htr4SUwbuCrP7hAy2QvMLTFC3ZXFtqkYST09/cCm4leZFfLJBX1lWS1vm2gxgzZYVOTu4RHMF3OGi43prJFL184tbUuA+wzEsDisDw0jtGT/xVLQE9a0QKxlugVzRrie5ie1gpNPuKVtBlupEXv+z+3dTlgwW2D0PSn8wAbBs3EtUirKWk0l8JxPB+mBTcsgx4OYEUfEAZZ1t 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:(396003)(136003)(366004)(346002)(39860400002)(376002)(38100700002)(186003)(30864003)(55016002)(8936002)(53546011)(6506007)(5660300002)(4326008)(122000001)(26005)(966005)(66946007)(76116006)(478600001)(54906003)(7696005)(110136005)(52536014)(2906002)(86362001)(33656002)(83380400001)(66446008)(64756008)(66556008)(66476007)(316002)(9686003)(71200400001)(8676002)(21314003);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?6RTBeFkOh7WbcTJnRDsG/PJSDXvIhKocSV2/G9/OSBmfE+xMxnTVAGPWwYdl?= =?us-ascii?Q?ZboH/9o7wUxDFuNpWeFSDbKSZ8ew/AtefV60ew/N77BYn7F9CJIZevMig5RB?= =?us-ascii?Q?S5P24JCx3cu+txv1HrsEGoFejv7s8/ZXkWFWIUAVKGfbEwKtxlcB/V1ISl80?= =?us-ascii?Q?ygCXBHAGi60i4wm7oW4viejl09PTTvsl0aSGTDd6R9g8Ra9tqxa9T5tqg8MH?= =?us-ascii?Q?WoGrAz4iOvoTUe8Ie0MrE0irYR3p5QW7ixWsQrjwYsGE6Pd5PKg8GMeP06DB?= =?us-ascii?Q?fB2RMaLxuCA2PUL0wYS26Ue9uqKitQXMPzJbbHEBPPHi6bdIp4WpelnQb4e5?= =?us-ascii?Q?jAypi1cshA7wx6ZF9+BOL56iKU67I4qwYvxztFRKP72III1ZzGvHjj6f5Tu9?= =?us-ascii?Q?OBH6GeRzm5xiISHJTa3DPGksC+ZVAMPvCL27XIPP67A6jtlr3/EcBDebHaEi?= =?us-ascii?Q?aliyiChftot7EHRoLhGA+nH0ndPUd2MMcM/wo7adYYj7QN+IreMUF/nIG3Ef?= =?us-ascii?Q?PmzVZiyo/kcSbMpcvmZA+WL4Z3uUL4B3gvYrTMWh8cetivfSurCdE6Q6DUMQ?= =?us-ascii?Q?vg66fCixLEPCjb162xCpmrKiEtqnqtAvaPfCeeAO+iAF1AoXuPVhXq96gVG6?= =?us-ascii?Q?HMyQfhHGnxeT5kPPTCod5LCuIXfIQSP4nqLmpaXTTOCDEIO6FEQoEcwAtf8h?= =?us-ascii?Q?5CQBOKAGFKpiHUUHmmkYl3OThGU/KZVJNp9jIiSLslW7XZMtny5qHcSRDehO?= =?us-ascii?Q?tG8DT77O3RXYeE1zd4H5VNWSoGX8BPX6p110kgwknq90OgTpo5bN/QkcTqF5?= =?us-ascii?Q?4Z9repOLrh76E/ps13x5EwyRMe06oIWnL5w7o2xIxubLYSNXYMQuL+ZilBpO?= =?us-ascii?Q?LM6T1mf/5bkxfiPnZH2+ahSWid1ifvQUYdEBuVkVGjg3CaecnqVzaMJjOg3H?= =?us-ascii?Q?WDO1uTjTQj7WgZDmZSpukJ1ED8ejLtBiji2tuaGEeJG/9m2Wu/K5gvM0cW9W?= =?us-ascii?Q?pjFcGz56maBG3m52K+1UVO4TmdQP75bQsNmalR7ivVmMZVldMVe8VwIPL9UJ?= =?us-ascii?Q?0m01hLKpVllI5GvXwqnhWS601FWxNh2FamAwAbJnGXoR+re5YndTdvE7Mhcw?= =?us-ascii?Q?L63dJz1rJU1u8ZqK9+RVRCbQ8EXewmUn2G2hMEkkNvKViOw9Lwa6SCbzIFv6?= =?us-ascii?Q?aPavYMS3Y/NxNgmBKW6izGlt2DiAzJEyDF7q9a/QVnJPLnavaUNJ84QNPSNy?= =?us-ascii?Q?dMel8KgKZfLhns61R0GRlCtFGlJbhL/NcJ6itA3H/3PwP8zhKKwJrrQD8Lm6?= =?us-ascii?Q?WVg=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: 31b1dbf0-f0ce-4b37-0c57-08d92f97d8a6 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Jun 2021 00:52:26.9674 (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: Ssv2bKLnQ7FMDtHhFr7ImjdSSvdRf15lxPiFu1/BhmvkxrAc4X8qK1D0ZJRU5AwxZ534KKyrABExh5Ab+Akmkg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB4756 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 Add Mike Turner for review. -----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