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.web08.3932.1666946040290268150 for ; Fri, 28 Oct 2022 01:34:00 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=arziT3tc; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: yuwei.chen@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666946040; x=1698482040; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=zK7xw4XhcerIL18EBYWmQgV6xk6awUWbeucEQTgKS0k=; b=arziT3tc0csqRWm2pivYJEnx9429vWpC6Wq8CFp/4LaEzq75OWkoLKf+ bsaJipf9S1Sgv172kQ9rybEPL5QjIIl1ZQtsftv8dgUBFXhaxXEnkrVej sGBKMtoXy70n+WM8FseMJ8adJ9hH0SwjD+4CCkRoWQrnN8/w4MhCvIX1c s2Jz8AbxSKIxO7+HCOeEWIwLNJJBbqHf34xupRi6P5d0Jh8ZSHlTOIXO0 AJQcH3yq4R1CXT/ncjk8aMWIv3ycfjp3uGszD9RtmyqtpPF8K1EalWbXQ vo0j+KNaPQQMhE3C2w0GQc9nyoNv1Ni1QodG4Z+Cxpahva9ZW789n0Q69 w==; X-IronPort-AV: E=McAfee;i="6500,9779,10513"; a="288838617" X-IronPort-AV: E=Sophos;i="5.95,220,1661842800"; d="scan'208";a="288838617" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Oct 2022 01:33:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10513"; a="632707885" X-IronPort-AV: E=Sophos;i="5.95,220,1661842800"; d="scan'208";a="632707885" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orsmga002.jf.intel.com with ESMTP; 28 Oct 2022 01:33:59 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Fri, 28 Oct 2022 01:33:58 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31 via Frontend Transport; Fri, 28 Oct 2022 01:33:58 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.43) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.31; Fri, 28 Oct 2022 01:33:58 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WH8+ExguxixYGN6VPYFiWfbCASjGQBXBgMpsc97bYs2np89G0/boqOhoFgwimJRf3ME0dHTANKgwBSPXtcLA361XVyNdJFJOgt4JAj9QaLJJGFLrSjs93hgsVULvHxYlRIo0tPimWLTtLmY6HytbCje97oKBkQ71+0FO3jyvzBDKXe96xykXite+pggkQdGSp747cI26/kfp+iT1mbe+FTBWK/Qzz56qOm7/PGjn6wRWTDGonMyo7qpvlcG1w9+Rvs+EHAdOLdYRIBLJvKXHgnn6OJWogDXrBIMR/wujfSoE3JJf9y0f1iV3CqsFsrrFfDcUc3EVsBznka0ddHVd9w== 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=0NUOBmXJH+zDU10EQGoPO5vL1NlRsL29vM9yvEOBbdk=; b=MuxuaVY44FwY57WHZnrByjNAv0PbzPSTRUGMvxaezDLawOLi1d+gqVE8Vz3HktOI0sFMU/rt2I6oRsQW783bH851MKpHiSEiLQk34SNgyHU5vKFK9OdlvypkR9OBa7lnpHctMf4iK9q4kKKNwP6OwQKg4DUqrqyFFKCPL6rXNncEPTLUKssAe4W4YcU08sNa3dgwnp/964R3Beug4EVhetOZd/LDr329rRNKHOXhGxX21A1xMohx7+8SM+mEQoM4hnc0pvBy9p3696oVR7EjEfWiGHE6iCwqkKOgW62PlqgGI9bhOVkCZbIbv2yXFDJsgYw16UPebj6c8PvjEozqrg== 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 Received: from MW5PR11MB5906.namprd11.prod.outlook.com (2603:10b6:303:1a0::21) by MW3PR11MB4732.namprd11.prod.outlook.com (2603:10b6:303:2c::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.15; Fri, 28 Oct 2022 08:33:52 +0000 Received: from MW5PR11MB5906.namprd11.prod.outlook.com ([fe80::84e1:858:a167:3b00]) by MW5PR11MB5906.namprd11.prod.outlook.com ([fe80::84e1:858:a167:3b00%8]) with mapi id 15.20.5746.028; Fri, 28 Oct 2022 08:33:52 +0000 From: "Yuwei Chen" To: "devel@edk2.groups.io" , "Kinney, Michael D" CC: "Feng, Bob C" , "Gao, Liming" , "Chen, Christine" Subject: Re: [edk2-devel] [PATCH] BaseTools: Fix build option overrides Pcd Feature Flag issue Thread-Topic: [edk2-devel] [PATCH] BaseTools: Fix build option overrides Pcd Feature Flag issue Thread-Index: AQHY6E8GPNmwPK+YD0a2sultmeXMX64jfu2w Date: Fri, 28 Oct 2022 08:33:52 +0000 Message-ID: References: <172143CEEE5293C9.21867@groups.io> In-Reply-To: <172143CEEE5293C9.21867@groups.io> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.6.500.17 dlp-reaction: no-action dlp-product: dlpe-windows authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MW5PR11MB5906:EE_|MW3PR11MB4732:EE_ x-ms-office365-filtering-correlation-id: dfbeb782-7d08-445d-f4d5-08dab8bf24e8 x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: GAU3eyaB0OOKxlXxOZ7/bnM55ZyvjUTp08y6POV5+L+tzoZCyCEwefzEjMhjsawvghuO6xj904k4igesqwDRSTo9573DtkeIg6/ggUe6DUXwBVQ0IJDTYzZYY6ntRuN6aCSR+3EcgP3uIAxHu9GSkUCg307STvoIdX5QfHRQSd8mXC/xT8w4Y+LnFrTQogyGQqnrLazJf2/YDQlaYpFxWbk11V4CfzLvLTVOze7ct7H8nCa8XTMWG/KPNk/MExwm993uW7XRGbkJKilX7Gw5ZVzeZweE/+mvq3rgAvuhSS9E/BiB8X79+rI6imtWLtPGAEzmU1gAr8gZYRmuM/CGK5WP8rZOYtNsWJzoaystSQoEpPA9N+mGylLVGmCxkJcc4YPCKQHWx8E6tdvHdvdvAq15aa/Jkq2+QjmEyGd85RsZuSNP/D/3Y9WY3fYHAaFwi30FXWioBrPsx+XJhHF9AxiJcfWSjb4X5qqId1+NQWoHcgwSzhgxhW57R14C63iC34pKdoziD4R2zQZ867yzx8yanaFcts/XByJpRijXFP1YN0SaEknDkEjY4YAstH3aAPB4JfhcJyGiv40mo8DN+0vXixh8PKktodG4OSxLR+bRY24w8SeyUe6GZ1d7v6nMls0JTeikLe/phP1SWXaGBkYfl5cTS2WnyVmngE5F61kagqGamuAOadH/tKyihFscteEO9V+X6jOGlDc/NPyZdTieOQdab46EzcIkPw4kew9pemgd+pSY8kgirWUcaPHP1KG+V8Ic4ROE+0BYKJREfyVperLz4BLfDIaQnkj+qLmrYSqVhmp0h43OT+5T1ciLOosrpXTULy0KLBBcwxkA7w== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MW5PR11MB5906.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(346002)(39860400002)(376002)(136003)(366004)(396003)(451199015)(478600001)(9686003)(7696005)(107886003)(6506007)(26005)(53546011)(186003)(83380400001)(2906002)(55016003)(76116006)(316002)(6636002)(54906003)(110136005)(19627235002)(71200400001)(966005)(8936002)(52536014)(4326008)(5660300002)(8676002)(64756008)(66446008)(66476007)(66556008)(66946007)(41300700001)(66899015)(86362001)(33656002)(38100700002)(122000001)(38070700005)(82960400001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?odkMoVhUQkckw7thpsucxrOgYChA/ICjDmxAx4TMAX9iJwE27bLUthCIyYhk?= =?us-ascii?Q?qYMgIsIWrjE9dvuSWkUwfhqAX06DyicsblII2r0tBdkaBBB13rwScYJSHc3U?= =?us-ascii?Q?S1yI5lWwLZqxzA9vFLyPxMysS2SK+7DTHzdCQHmn2oMxgLfJbX2KXDTXJACh?= =?us-ascii?Q?n6uZ1JpQLzYs2lB0PpzkQME39b6w8n32CnHTnOXnnnJYXW95+KjJxgXDY/oT?= =?us-ascii?Q?DPDABRtmDJTSiKXKKFIrmmjg9xG9K4YY30f/M0ioPZyKXCEFoYP442PhSDqT?= =?us-ascii?Q?Kh16OPtZhWycBKHvNZKTACWgfsj3T0rgm//4SkczUclwx4S2N304FwSZaqnD?= =?us-ascii?Q?BJVGIiqj+uO03hRtJj52gQEqDS3Zm4Vi6ZC9ATHlKtuW5YZsGVnZBuJ6IM72?= =?us-ascii?Q?F+fJocGAQC0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4e3wZCG7GHUIML6fZsB1t?= =?us-ascii?Q?e5zq7VXgEac4cY1hi7ydTRMeVPCyjW9GVvmuZ/WP5wVsbOhh4aO1L6GRi1WQ?= =?us-ascii?Q?vH5DQSTPx6z0sTRHdUrPfJayyraRNAUlnhwZTp8Ductd1lo3mmikeWIB57Af?= =?us-ascii?Q?x4rErAzC3NWtizk0eMwKp8uRhIdYS2PYEszN3m8uLFOhOoybXbHmAFNvVAjm?= =?us-ascii?Q?Eq4mlU//LxO88uabxh3IC719z149CB2Ip6/SQIYAvuVs02W4i5GfsXGwcLVq?= =?us-ascii?Q?uOfFHov4/nuQdC0cr0w0ZK2WK3qt/WNJtxz/JzoM?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW5PR11MB5906.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: dfbeb782-7d08-445d-f4d5-08dab8bf24e8 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Oct 2022 08:33:52.3545 (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: URUeeKBgC/x2RLhri1AQ235GzAnG/13xVyaxd2BwGDfDs83pi67SHE4yVotkixtG5r/Qmn83tox65TPYvdWRJA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR11MB4732 Return-Path: yuwei.chen@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc Mike. Thanks, Christine > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Yuwei > Chen > Sent: Tuesday, October 25, 2022 4:51 PM > To: devel@edk2.groups.io > Cc: Feng, Bob C ; Gao, Liming > > Subject: [edk2-devel] [PATCH] BaseTools: Fix build option overrides Pcd > Feature Flag issue >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4081 >=20 > INF [Sources] section Feature Flag Expressions do not use override values > from build --pcd option currently. > This patch fix this issue. >=20 > Cc: Bob Feng > Cc: Liming Gao > Signed-off-by: Yuwei Chen > --- > edk2basetools/Workspace/InfBuildData.py | 17 +++++++++++++++++ > 1 file changed, 17 insertions(+) >=20 > diff --git a/edk2basetools/Workspace/InfBuildData.py > b/edk2basetools/Workspace/InfBuildData.py > index c97a70e..8631373 100644 > --- a/edk2basetools/Workspace/InfBuildData.py > +++ b/edk2basetools/Workspace/InfBuildData.py > @@ -1055,6 +1055,7 @@ def IsBinaryModule(self): > return False > def CheckFeatureFlagPcd(self,Instance): > Pcds =3D GlobalData.gPlatformFinalPcds.copy() > + BuildOptionPcds =3D GlobalData.BuildOptionPcd > if PcdPattern.search(Instance): > PcdTuple =3D tuple(Instance.split('.')[::-1]) > if PcdTuple in self.Pcds: > @@ -1062,6 +1063,14 @@ def CheckFeatureFlagPcd(self,Instance): > EdkLogger.error('build', FORMAT_INVALID, > "\nFeatureFlagPcd must be defined in= a [PcdsFeatureFlag] > or [PcdsFixedAtBuild] section of Dsc or Dec file", > File=3Dstr(self), ExtraData=3DInstan= ce) > + for item in BuildOptionPcds: > + if self.Pcds[PcdTuple].TokenCName in item: > + if type(item) =3D=3D type(()): > + # ('gEfiCryptoPkgTokenSpaceGuid', 'PcdOpenss= lEcEnabled', '', > '1', ('build command options', 1) > + Pcds[Instance] =3D list(item)[3] > + elif type(item) =3D=3D type(''): > + # gEfiCryptoPkgTokenSpaceGuid.PcdOpensslEcEn= abled=3D1 > + Pcds[Instance] =3D item.split('=3D')[1] > if not Instance in Pcds: > Pcds[Instance] =3D self.Pcds[PcdTuple].DefaultValue > else: #if PcdTuple not in self.Pcds: > @@ -1085,6 +1094,14 @@ def CheckFeatureFlagPcd(self,Instance): > for Name, Guid in self.Pcds: > if self.Pcds[(Name, Guid)].Type =3D=3D 'FeatureFlag' or = self.Pcds[(Name, > Guid)].Type =3D=3D 'FixedAtBuild': > PcdFullName =3D '%s.%s' % (Guid, Name); > + for item in BuildOptionPcds: > + if Name in item: > + if type(item) =3D=3D type(()): > + # ('gEfiCryptoPkgTokenSpaceGuid', 'PcdOp= ensslEcEnabled', > '', '1', ('build command options', 1) > + Pcds[PcdFullName] =3D list(item)[3] > + elif type(item) =3D=3D type(''): > + # gEfiCryptoPkgTokenSpaceGuid.PcdOpenssl= EcEnabled=3D1 > + Pcds[PcdFullName] =3D item.split('=3D')[= 1] > if not PcdFullName in Pcds: > Pcds[PcdFullName] =3D self.Pcds[(Name, Guid)].De= faultValue > try: > -- > 2.27.0.windows.1 >=20 >=20 >=20 >=20 >=20