From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=68.232.149.220; helo=esa2.dell-outbound.iphmx.com; envelope-from=karunakarpoosapalli@dell.com; receiver=edk2-devel@lists.01.org Received: from esa2.dell-outbound.iphmx.com (esa2.dell-outbound.iphmx.com [68.232.149.220]) (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 700EB211AD36A for ; Thu, 10 Jan 2019 22:33:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=dell.com; i=@dell.com; q=dns/txt; s=smtpout; t=1547188419; x=1578724419; h=from:cc:to:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=h50MsEwU9p8oGb392TA+6BqCaaTaIviaQ75DjM+v81c=; b=FCaX7lvwoUZFZd8JynJzz/k02/GsxuZ6/r/biCi5N5u0EzLSlehmaO33 w+U7vxulRW5OUvr9f+VsE8ZNOtpgoS6z70ZX50H4T2BTl/TB938Ukyku6 XOhIX5MzDP2AayV9TFheqvPwBKXJTsgBQcyxk/fsW4VWOPqIrj8dH/i6e o=; X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2EBAABtODhchyeV50NkGgEBAQEBAgE?= =?us-ascii?q?BAQEHAgEBAQGBUQUBAQEBCwGCaYECJwqIXYM0X4sQO4FSl3oUgWcLAQEYDQc?= =?us-ascii?q?ChD4CgiYiNAkNAQMBAQIBAQIBAQIQAQEBCgsJCCkjDII6IhyBCwEBAQEBAQE?= =?us-ascii?q?BAU0CCAVjAQEBAQECAQEQFRM0CwwEAgEIEQQBAQEeCQcnAR4JCAIEARIIARm?= =?us-ascii?q?DAAGCAAEPoQc9AoFuiQcBAQGBazOEQQI7AwGFLYw/ghaDdS6DHgECAlxOAQE?= =?us-ascii?q?SAS+FLiICiUWYNgmHGoZFhBwggWSFJIM2hz+JcIEIhAaLPgIEAgQFAhSBRoE?= =?us-ascii?q?ecXBQgmwJgh4OCYhfhT9BMQGBJ4ZxgR8BgR4BAQ?= X-IPAS-Result: =?us-ascii?q?A2EBAABtODhchyeV50NkGgEBAQEBAgEBAQEHAgEBAQGBU?= =?us-ascii?q?QUBAQEBCwGCaYECJwqIXYM0X4sQO4FSl3oUgWcLAQEYDQcChD4CgiYiNAkNA?= =?us-ascii?q?QMBAQIBAQIBAQIQAQEBCgsJCCkjDII6IhyBCwEBAQEBAQEBAU0CCAVjAQEBA?= =?us-ascii?q?QECAQEQFRM0CwwEAgEIEQQBAQEeCQcnAR4JCAIEARIIARmDAAGCAAEPoQc9A?= =?us-ascii?q?oFuiQcBAQGBazOEQQI7AwGFLYw/ghaDdS6DHgECAlxOAQESAS+FLiICiUWYN?= =?us-ascii?q?gmHGoZFhBwggWSFJIM2hz+JcIEIhAaLPgIEAgQFAhSBRoEecXBQgmwJgh4OC?= =?us-ascii?q?YhfhT9BMQGBJ4ZxgR8BgR4BAQ?= Received: from mx0a-00154901.pphosted.com ([67.231.149.39]) by esa2.dell-outbound.iphmx.com with ESMTP/TLS/AES256-SHA256; 11 Jan 2019 00:33:36 -0600 Received: from pps.filterd (m0134746.ppops.net [127.0.0.1]) by mx0a-00154901.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x0B6XaJc153897 for ; Fri, 11 Jan 2019 01:33:36 -0500 Received: from esa5.dell-outbound2.iphmx.com (esa5.dell-outbound2.iphmx.com [68.232.153.203]) by mx0a-00154901.pphosted.com with ESMTP id 2pxjn90vwy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Fri, 11 Jan 2019 01:33:36 -0500 From: Cc: , , , Received: from ausxipps306.us.dell.com ([143.166.148.156]) by esa5.dell-outbound2.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA256; 11 Jan 2019 12:33:25 +0600 X-LoopCount0: from 10.166.135.96 X-IronPort-AV: E=Sophos;i="5.56,464,1539666000"; d="scan'208";a="259507566" To: , , , Thread-Topic: [edk2] Conditional Compilation support in INF file Thread-Index: AdSn6DwaFQapYNOqQoKF9n2RWq0Njf//6EQAgAAcnoD//oKZUIADExOAgAAwnwCAABIYAP/+wVww Date: Fri, 11 Jan 2019 06:33:30 +0000 Message-ID: <524c6b9c19b34d3680f709e6f0b2e68b@BLRX13MDC432.AMER.DELL.COM> References: <1a62f519f4b2466fb97c0dd7a81057e6@BLRX13MDC432.AMER.DELL.COM> <03c8ee0d-dca5-a7ca-b941-f45bd0fd6c38@redhat.com> <4A89E2EF3DFEDB4C8BFDE51014F606A14E3AE69B@SHSMSX152.ccr.corp.intel.com> <3cd149b2ee7942dda2ebef04bd0f6977@BLRX13MDC432.AMER.DELL.COM> <63fd7d96-31f9-9a8d-6191-20c851ad54c3@redhat.com> <4A89E2EF3DFEDB4C8BFDE51014F606A14E3AF0FC@SHSMSX152.ccr.corp.intel.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [163.244.186.30] MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-01-11_04:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1901110056 Subject: Re: Conditional Compilation support in INF file X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jan 2019 06:33:39 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi All, Thank you very much for your valuable thoughts. Below are my concerns/thoughts, Could you please help on 1. Is there any module or INF already using FeatureFlagExpression feature s= upport in current edk2 source? 2. If not, could you please help in providing more detailed spec/Doc to ver= ify this support. 3. Below are the few of use cases we're looking for, Did really FeatureFlag= Expression support all of this? a. If we've this support we can add different protocols in DEPEX secti= on, like we can put condition check and add rotococol1 for Notebook and Pro= tocol2 for Desktop. b. Help in simplifying build files. We could dispense with the = prefix to inf files and more developer convenient.=20 c. Sometimes we would like to add Conditional .C and .H for file inclusi= on. Helps in our Debug / release builds as well.. Example; we do have release and debug build, although Source Section ha= s - IA32,X64, Common, IPF, EBC exclusively.=20 But for the same Source section, we can't have choices based on our = build inputs... #if Condition1 [Sources] Main.c #elif Condition2 [Sources] DebugMain.c 4. I don't think INF file support MACRO support, How complex in modifying t= he BaseTools to support Condition checks and MACRO support? Thanks & Regards, Karunakar -----Original Message----- From: Kinney, Michael D [mailto:michael.d.kinney@intel.com]=20 Sent: Thursday, January 10, 2019 10:23 PM To: Gao, Liming; Laszlo Ersek; Poosapalli, Karunakar; edk2-devel@lists.01.o= rg; Kinney, Michael D Cc: Vidyadhara, Sumanth; Gao, Liming; Raju, SriramKumar Subject: RE: [edk2] Conditional Compilation support in INF file [EXTERNAL EMAIL]=20 There is one additional constraint for adding conditionals to INF files. The UEFI Distribution Packaging Specification defines a format to share pac= kage and module content in a standard format and uses an XML schema for the= metadata. We need to be able to convert between INF <--> XML and DEC <-->= XML. http://www.uefi.org/sites/default/files/resources/Dist_Package_Spec_1_1.pdf If we define extensions to INF or DEC files, we need to make sure these tra= nsforms are still supported. If an extension prevents these transforms, th= en we either need to change the extension to be compatible or work on an up= date to the UDP spec to support the extension in the XML. Best regards, Mike > -----Original Message----- > From: edk2-devel [mailto:edk2-devel- > bounces@lists.01.org] On Behalf Of Gao, Liming > Sent: Thursday, January 10, 2019 7:48 AM > To: Laszlo Ersek ; > KarunakarPoosapalli@Dell.com; edk2-devel@lists.01.org > Cc: Sumanth.Vidyadhara@dell.com; Gao, Liming ;=20 > Sriramkumar.Raju@dell.com > Subject: Re: [edk2] Conditional Compilation support in INF file >=20 > I have same question. What flexibility is expected in INF? I see one=20 > request in [Depex] section. So, PCD support in [Depex] is added. >=20 > Edk2 INF is used to describe the source code behavior. > If the source uses Ppi/Protocol/Guid/Pcd, these information are always=20 > required to be described in INF file. The compiler can optimize the=20 > code and remove the unused Ppi/Protocol/Guid/Pcd. It doesn't need=20 > developer specify the conditional statement. >=20 > Thanks > Liming > > -----Original Message----- > > From: Laszlo Ersek [mailto:lersek@redhat.com] > > Sent: Thursday, January 10, 2019 8:54 PM > > To: KarunakarPoosapalli@Dell.com; Gao, Liming > ; edk2-devel@lists.01.org > > Cc: Sumanth.Vidyadhara@dell.com; > Sriramkumar.Raju@dell.com > > Subject: Re: [edk2] Conditional Compilation support in > INF file > > > > On 01/10/19 07:03, KarunakarPoosapalli@Dell.com wrote: > > > Hi All, > > > > > > I agree with providing the support like > "FixedAtBuild PCD in INF". And we need to modify or provide support in=20 > BaseTools to support > > this feature. > > > > > > There are more use cases or flexibility to developer > if we support Conditional compilation support in INF. > > > As we're providing support in BaseTools for > FixedAtBuild PCD support in INF, Is there any challenges or drawbacks=20 > in providing > > conditional compilation support in INF? > > > > This is not for me to say authoritatively, but I'm > unaware of any > > specific use case that cannot be solved without this > feature addition, > > and any further complexity to BaseTools should be > strongly justified. > > "More convenient" is too vague for me, and the > BaseTools code is already > > hard to read and debug. > > > > That's just my opinion, again. > > > > Thanks > > Laszlo > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel