* Conditional Compilation support in INF file @ 2019-01-09 6:55 KarunakarPoosapalli 2019-01-09 11:00 ` Laszlo Ersek 0 siblings, 1 reply; 16+ messages in thread From: KarunakarPoosapalli @ 2019-01-09 6:55 UTC (permalink / raw) To: edk2-devel Hi ALL, I've an idea regards "Adding conditional compilation support in INF files" Ides is like, we can condition check in INF file like below #if Condition1 Protocol1 #elif Condition2 Protocol2 #else Protocol3 #endif If we've this support we can add different protocols in DEPEX section, Like we can put condition check and add rotococol1 for Notebook and Protocol2 for Desktop. And will have so many benefits adding this support. I don't think current EDK2 support this. Please let me know comments/suggestions, so that I will start working on it. Thanks & Regards, Karunakar ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Conditional Compilation support in INF file 2019-01-09 6:55 Conditional Compilation support in INF file KarunakarPoosapalli @ 2019-01-09 11:00 ` Laszlo Ersek 2019-01-09 12:42 ` Gao, Liming 0 siblings, 1 reply; 16+ messages in thread From: Laszlo Ersek @ 2019-01-09 11:00 UTC (permalink / raw) To: KarunakarPoosapalli, edk2-devel On 01/09/19 07:55, KarunakarPoosapalli@Dell.com wrote: > Hi ALL, > > > > I've an idea regards "Adding conditional compilation support in INF files" > > > > Ides is like, we can condition check in INF file like below > > > > #if Condition1 > > Protocol1 > > #elif Condition2 > > Protocol2 > > #else > > Protocol3 > > #endif > > > > If we've this support we can add different protocols in DEPEX section, Like we can put condition check and add rotococol1 for Notebook and Protocol2 for Desktop. > > And will have so many benefits adding this support. > > > > I don't think current EDK2 support this. > > Please let me know comments/suggestions, so that I will start working on it. I'm not sure this feature is really required. We already have the following tools at our disposal, to customize module builds at the INF file level: (1) Please see <https://bugzilla.tianocore.org/show_bug.cgi?id=443>. (Unfortunately, the INF file spec doesn't seem to document the syntax; <https://lists.01.org/pipermail/edk2-devel/2017-March/008976.html> should help however.) (2) If the number of cases that need to be distinguished is low, it's possible to duplicate the INF file, keep the [Sources] section(s) and similar sections identical, and only customize the sections that need changes. Then include the right INF file in the platform DSC and FDF files, dependent on PCD settings or build defines (macros). (3) Sometimes it makes sense to delay the dispatching of a module until another module makes a decision about a platform feature, dynamically. An important characteristic of this case is that the dependent module should not be prevented from starting *completely* in case the platform feature is absent; it should only be made wait until the decision is recorded, by the other module. This way the dependent module will not incorrectly customize its own behavior before the decision on the platform feature is made. In this case, it's usually possible to write the depex such as (gProtocolGuid1 AND gProtocolGuid2) OR (gProtocolGuid3 AND gProtocolGuid4) OR gThisParticularFeatureDisabledProtocolGuid Here: - gProtocolGuid1 and gProtocolGuid2 could be specific to "Notebook", - gProtocolGuid3 and gProtocolGuid4 could be specific to "Desktop", - and gThisParticularFeatureDisabledProtocolGuid would be a *synthetic* protocol GUID -- installed in the protocol database with a NULL interface -- through which the decision-making module would simply advertize, "none of the relevant features are available, and you need not wait any longer". "gThisParticularFeatureDisabledProtocolGuid" is usually defined / declared as a platform Pkg-specific GUID, in the appropriate DEC file, and in Include/Guid/...., under the same Pkg. (4) It is possible to hook such dependencies into other (core) modules. In the platform Package, you can implement a library that (a) has an empty constructor function, and (b) the DEPEX of your choosing (see above). The library should do nothing else. Then, in the package DSC file, hook the library into the core module in question via NULL class resolution. As a result, the library will not alter the behavior of the core module, but the core module will inherit the depex (it will be AND-ed together with other dependencies that the core module might have). Thanks Laszlo ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Conditional Compilation support in INF file 2019-01-09 11:00 ` Laszlo Ersek @ 2019-01-09 12:42 ` Gao, Liming 2019-01-09 14:37 ` Laszlo Ersek 2019-01-10 6:03 ` KarunakarPoosapalli 0 siblings, 2 replies; 16+ messages in thread From: Gao, Liming @ 2019-01-09 12:42 UTC (permalink / raw) To: Laszlo Ersek, KarunakarPoosapalli@Dell.com, edk2-devel@lists.01.org Laszlo: INF Spec: FixedAtBuild (VOID*) PCD use in the [DEPEX] section has been added into INF spec git book (git@github.com:tianocore-docs/edk2-InfSpecification.git). BZ https://bugzilla.tianocore.org/show_bug.cgi?id=444 The change is in INF spec trunk. New version INF spec will include it. Thanks Liming > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Laszlo Ersek > Sent: Wednesday, January 9, 2019 7:00 PM > To: KarunakarPoosapalli@Dell.com; edk2-devel@lists.01.org > Subject: Re: [edk2] Conditional Compilation support in INF file > > On 01/09/19 07:55, KarunakarPoosapalli@Dell.com wrote: > > Hi ALL, > > > > > > > > I've an idea regards "Adding conditional compilation support in INF files" > > > > > > > > Ides is like, we can condition check in INF file like below > > > > > > > > #if Condition1 > > > > Protocol1 > > > > #elif Condition2 > > > > Protocol2 > > > > #else > > > > Protocol3 > > > > #endif > > > > > > > > If we've this support we can add different protocols in DEPEX section, Like we can put condition check and add rotococol1 for > Notebook and Protocol2 for Desktop. > > > > And will have so many benefits adding this support. > > > > > > > > I don't think current EDK2 support this. > > > > Please let me know comments/suggestions, so that I will start working on it. > > I'm not sure this feature is really required. We already have the > following tools at our disposal, to customize module builds at the INF > file level: > > (1) Please see <https://bugzilla.tianocore.org/show_bug.cgi?id=443>. > (Unfortunately, the INF file spec doesn't seem to document the syntax; > <https://lists.01.org/pipermail/edk2-devel/2017-March/008976.html> > should help however.) > > (2) If the number of cases that need to be distinguished is low, it's > possible to duplicate the INF file, keep the [Sources] section(s) and > similar sections identical, and only customize the sections that need > changes. Then include the right INF file in the platform DSC and FDF > files, dependent on PCD settings or build defines (macros). > > (3) Sometimes it makes sense to delay the dispatching of a module until > another module makes a decision about a platform feature, dynamically. > An important characteristic of this case is that the dependent module > should not be prevented from starting *completely* in case the platform > feature is absent; it should only be made wait until the decision is > recorded, by the other module. This way the dependent module will not > incorrectly customize its own behavior before the decision on the > platform feature is made. > > In this case, it's usually possible to write the depex such as > > (gProtocolGuid1 AND gProtocolGuid2) OR > (gProtocolGuid3 AND gProtocolGuid4) OR > gThisParticularFeatureDisabledProtocolGuid > > Here: > - gProtocolGuid1 and gProtocolGuid2 could be specific to "Notebook", > - gProtocolGuid3 and gProtocolGuid4 could be specific to "Desktop", > - and gThisParticularFeatureDisabledProtocolGuid would be a *synthetic* > protocol GUID -- installed in the protocol database with a NULL > interface -- through which the decision-making module would simply > advertize, "none of the relevant features are available, and you need > not wait any longer". > > "gThisParticularFeatureDisabledProtocolGuid" is usually defined / > declared as a platform Pkg-specific GUID, in the appropriate DEC file, > and in Include/Guid/...., under the same Pkg. > > (4) It is possible to hook such dependencies into other (core) modules. > In the platform Package, you can implement a library that (a) has an > empty constructor function, and (b) the DEPEX of your choosing (see > above). The library should do nothing else. Then, in the package DSC > file, hook the library into the core module in question via NULL class > resolution. As a result, the library will not alter the behavior of the > core module, but the core module will inherit the depex (it will be > AND-ed together with other dependencies that the core module might have). > > Thanks > Laszlo > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Conditional Compilation support in INF file 2019-01-09 12:42 ` Gao, Liming @ 2019-01-09 14:37 ` Laszlo Ersek 2019-01-10 6:03 ` KarunakarPoosapalli 1 sibling, 0 replies; 16+ messages in thread From: Laszlo Ersek @ 2019-01-09 14:37 UTC (permalink / raw) To: Gao, Liming, KarunakarPoosapalli@Dell.com, edk2-devel@lists.01.org On 01/09/19 13:42, Gao, Liming wrote: > Laszlo: > INF Spec: FixedAtBuild (VOID*) PCD use in the [DEPEX] section has been added into INF spec git book (git@github.com:tianocore-docs/edk2-InfSpecification.git). BZ https://bugzilla.tianocore.org/show_bug.cgi?id=444 > The change is in INF spec trunk. New version INF spec will include it. Ouch. I should have remembered. BZ#444 was filed by me. :) I've only checked the v1.27 INF spec now, on gitbooks.io. Thank you! Laszlo ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Conditional Compilation support in INF file 2019-01-09 12:42 ` Gao, Liming 2019-01-09 14:37 ` Laszlo Ersek @ 2019-01-10 6:03 ` KarunakarPoosapalli 2019-01-10 12:54 ` Laszlo Ersek 1 sibling, 1 reply; 16+ messages in thread From: KarunakarPoosapalli @ 2019-01-10 6:03 UTC (permalink / raw) To: liming.gao, lersek, edk2-devel; +Cc: Sumanth.Vidyadhara, Sriramkumar.Raju Hi All, I agree with providing the support like "FixedAtBuild PCD in INF". And we need to modify or provide support in 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 in providing conditional compilation support in INF? Thanks & Regards, Karunakar -----Original Message----- From: Gao, Liming [mailto:liming.gao@intel.com] Sent: Wednesday, January 9, 2019 6:12 PM To: Laszlo Ersek; Poosapalli, Karunakar; edk2-devel@lists.01.org Subject: RE: [edk2] Conditional Compilation support in INF file [EXTERNAL EMAIL] Laszlo: INF Spec: FixedAtBuild (VOID*) PCD use in the [DEPEX] section has been added into INF spec git book (git@github.com:tianocore-docs/edk2-InfSpecification.git). BZ https://bugzilla.tianocore.org/show_bug.cgi?id=444 The change is in INF spec trunk. New version INF spec will include it. Thanks Liming > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > Laszlo Ersek > Sent: Wednesday, January 9, 2019 7:00 PM > To: KarunakarPoosapalli@Dell.com; edk2-devel@lists.01.org > Subject: Re: [edk2] Conditional Compilation support in INF file > > On 01/09/19 07:55, KarunakarPoosapalli@Dell.com wrote: > > Hi ALL, > > > > > > > > I've an idea regards "Adding conditional compilation support in INF files" > > > > > > > > Ides is like, we can condition check in INF file like below > > > > > > > > #if Condition1 > > > > Protocol1 > > > > #elif Condition2 > > > > Protocol2 > > > > #else > > > > Protocol3 > > > > #endif > > > > > > > > If we've this support we can add different protocols in DEPEX > > section, Like we can put condition check and add rotococol1 for > Notebook and Protocol2 for Desktop. > > > > And will have so many benefits adding this support. > > > > > > > > I don't think current EDK2 support this. > > > > Please let me know comments/suggestions, so that I will start working on it. > > I'm not sure this feature is really required. We already have the > following tools at our disposal, to customize module builds at the INF > file level: > > (1) Please see <https://bugzilla.tianocore.org/show_bug.cgi?id=443>. > (Unfortunately, the INF file spec doesn't seem to document the syntax; > <https://lists.01.org/pipermail/edk2-devel/2017-March/008976.html> > should help however.) > > (2) If the number of cases that need to be distinguished is low, it's > possible to duplicate the INF file, keep the [Sources] section(s) and > similar sections identical, and only customize the sections that need > changes. Then include the right INF file in the platform DSC and FDF > files, dependent on PCD settings or build defines (macros). > > (3) Sometimes it makes sense to delay the dispatching of a module > until another module makes a decision about a platform feature, dynamically. > An important characteristic of this case is that the dependent module > should not be prevented from starting *completely* in case the > platform feature is absent; it should only be made wait until the > decision is recorded, by the other module. This way the dependent > module will not incorrectly customize its own behavior before the > decision on the platform feature is made. > > In this case, it's usually possible to write the depex such as > > (gProtocolGuid1 AND gProtocolGuid2) OR > (gProtocolGuid3 AND gProtocolGuid4) OR > gThisParticularFeatureDisabledProtocolGuid > > Here: > - gProtocolGuid1 and gProtocolGuid2 could be specific to "Notebook", > - gProtocolGuid3 and gProtocolGuid4 could be specific to "Desktop", > - and gThisParticularFeatureDisabledProtocolGuid would be a > *synthetic* protocol GUID -- installed in the protocol database with a > NULL interface -- through which the decision-making module would > simply advertize, "none of the relevant features are available, and > you need not wait any longer". > > "gThisParticularFeatureDisabledProtocolGuid" is usually defined / > declared as a platform Pkg-specific GUID, in the appropriate DEC file, > and in Include/Guid/...., under the same Pkg. > > (4) It is possible to hook such dependencies into other (core) modules. > In the platform Package, you can implement a library that (a) has an > empty constructor function, and (b) the DEPEX of your choosing (see > above). The library should do nothing else. Then, in the package DSC > file, hook the library into the core module in question via NULL class > resolution. As a result, the library will not alter the behavior of > the core module, but the core module will inherit the depex (it will > be AND-ed together with other dependencies that the core module might have). > > Thanks > Laszlo > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Conditional Compilation support in INF file 2019-01-10 6:03 ` KarunakarPoosapalli @ 2019-01-10 12:54 ` Laszlo Ersek 2019-01-10 15:48 ` Gao, Liming 0 siblings, 1 reply; 16+ messages in thread From: Laszlo Ersek @ 2019-01-10 12:54 UTC (permalink / raw) To: KarunakarPoosapalli, liming.gao, edk2-devel Cc: Sumanth.Vidyadhara, Sriramkumar.Raju 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 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 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 ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Conditional Compilation support in INF file 2019-01-10 12:54 ` Laszlo Ersek @ 2019-01-10 15:48 ` Gao, Liming 2019-01-10 16:53 ` Kinney, Michael D 0 siblings, 1 reply; 16+ messages in thread From: Gao, Liming @ 2019-01-10 15:48 UTC (permalink / raw) To: Laszlo Ersek, KarunakarPoosapalli@Dell.com, edk2-devel@lists.01.org Cc: Sumanth.Vidyadhara@dell.com, Sriramkumar.Raju@dell.com, Gao, Liming I have same question. What flexibility is expected in INF? I see one request in [Depex] section. So, PCD support in [Depex] is added. Edk2 INF is used to describe the source code behavior. If the source uses Ppi/Protocol/Guid/Pcd, these information are always required to be described in INF file. The compiler can optimize the code and remove the unused Ppi/Protocol/Guid/Pcd. It doesn't need developer specify the conditional statement. 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 <liming.gao@intel.com>; 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 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 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 ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Conditional Compilation support in INF file 2019-01-10 15:48 ` Gao, Liming @ 2019-01-10 16:53 ` Kinney, Michael D 2019-01-11 6:33 ` KarunakarPoosapalli 0 siblings, 1 reply; 16+ messages in thread From: Kinney, Michael D @ 2019-01-10 16:53 UTC (permalink / raw) To: Gao, Liming, Laszlo Ersek, KarunakarPoosapalli@Dell.com, edk2-devel@lists.01.org, Kinney, Michael D Cc: Sumanth.Vidyadhara@dell.com, Gao, Liming, Sriramkumar.Raju@dell.com There is one additional constraint for adding conditionals to INF files. The UEFI Distribution Packaging Specification defines a format to share package 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 transforms are still supported. If an extension prevents these transforms, then we either need to change the extension to be compatible or work on an update 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 <lersek@redhat.com>; > KarunakarPoosapalli@Dell.com; edk2-devel@lists.01.org > Cc: Sumanth.Vidyadhara@dell.com; Gao, Liming > <liming.gao@intel.com>; Sriramkumar.Raju@dell.com > Subject: Re: [edk2] Conditional Compilation support in > INF file > > I have same question. What flexibility is expected in > INF? I see one request in [Depex] section. So, PCD > support in [Depex] is added. > > Edk2 INF is used to describe the source code behavior. > If the source uses Ppi/Protocol/Guid/Pcd, these > information are always required to be described in INF > file. The compiler can optimize the code and remove the > unused Ppi/Protocol/Guid/Pcd. It doesn't need developer > specify the conditional statement. > > 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 > <liming.gao@intel.com>; 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 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 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 ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Conditional Compilation support in INF file 2019-01-10 16:53 ` Kinney, Michael D @ 2019-01-11 6:33 ` KarunakarPoosapalli 2019-01-11 18:54 ` Kinney, Michael D 0 siblings, 1 reply; 16+ messages in thread From: KarunakarPoosapalli @ 2019-01-11 6:33 UTC (permalink / raw) To: michael.d.kinney, liming.gao, lersek, edk2-devel Cc: Sumanth.Vidyadhara, liming.gao, Sriramkumar.Raju, Shekar.Babu.S 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 support in current edk2 source? 2. If not, could you please help in providing more detailed spec/Doc to verify this support. 3. Below are the few of use cases we're looking for, Did really FeatureFlagExpression support all of this? a. If we've this support we can add different protocols in DEPEX section, like we can put condition check and add rotococol1 for Notebook and Protocol2 for Desktop. b. Help in simplifying build files. We could dispense with the prefix to inf files and more developer convenient. c. Sometimes we would like to add Conditional .C and .H for file inclusion. Helps in our Debug / release builds as well.. Example; we do have release and debug build, although Source Section has - IA32,X64, Common, IPF, EBC exclusively. 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 the BaseTools to support Condition checks and MACRO support? Thanks & Regards, Karunakar -----Original Message----- From: Kinney, Michael D [mailto:michael.d.kinney@intel.com] Sent: Thursday, January 10, 2019 10:23 PM To: Gao, Liming; Laszlo Ersek; Poosapalli, Karunakar; edk2-devel@lists.01.org; Kinney, Michael D Cc: Vidyadhara, Sumanth; Gao, Liming; Raju, SriramKumar Subject: RE: [edk2] Conditional Compilation support in INF file [EXTERNAL EMAIL] There is one additional constraint for adding conditionals to INF files. The UEFI Distribution Packaging Specification defines a format to share package 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 transforms are still supported. If an extension prevents these transforms, then we either need to change the extension to be compatible or work on an update 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 <lersek@redhat.com>; > KarunakarPoosapalli@Dell.com; edk2-devel@lists.01.org > Cc: Sumanth.Vidyadhara@dell.com; Gao, Liming <liming.gao@intel.com>; > Sriramkumar.Raju@dell.com > Subject: Re: [edk2] Conditional Compilation support in INF file > > I have same question. What flexibility is expected in INF? I see one > request in [Depex] section. So, PCD support in [Depex] is added. > > Edk2 INF is used to describe the source code behavior. > If the source uses Ppi/Protocol/Guid/Pcd, these information are always > required to be described in INF file. The compiler can optimize the > code and remove the unused Ppi/Protocol/Guid/Pcd. It doesn't need > developer specify the conditional statement. > > 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 > <liming.gao@intel.com>; 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 > 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 > 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 ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Conditional Compilation support in INF file 2019-01-11 6:33 ` KarunakarPoosapalli @ 2019-01-11 18:54 ` Kinney, Michael D 2019-01-15 15:10 ` Gao, Liming 0 siblings, 1 reply; 16+ messages in thread From: Kinney, Michael D @ 2019-01-11 18:54 UTC (permalink / raw) To: KarunakarPoosapalli@Dell.com, Gao, Liming, lersek@redhat.com, edk2-devel@lists.01.org, Kinney, Michael D Cc: Sumanth.Vidyadhara@dell.com, Shekar.Babu.S@dell.com, Gao, Liming, Sriramkumar.Raju@dell.com Karunakar, Feature Flag Expressions is a concept that is defined in the specs, but is a feature that is not fully implemented. Liming should be able to provide details on what has been implemented and validated in BaseTools. I think the reason that this feature has not been implemented fully is that we have been able to find alternate ways to get the equivalent results. Here are a few example techniques: 3a: One approach is to use multiple INF files and select the Right INF for different types of platform builds in DSC file. If multiple modules share source files but have different elements produced/consumed/depex, then multiple INF file is an approach that makes the produced/consumed/depex clear and is compatible with UDP Spec. 3c: One approach is to use DEBUG_CODE(), DEBUG_CODE_BEGIN(), and DEBUG_CODE_END() macros in a single version of the source files and enable/disable the debug code using BIT2 in the following PCD: ## The mask is used to control DebugLib behavior.<BR><BR> # BIT0 - Enable Debug Assert.<BR> # BIT1 - Enable Debug Print.<BR> # BIT2 - Enable Debug Code.<BR> # BIT3 - Enable Clear Memory.<BR> # BIT4 - Enable BreakPoint as ASSERT.<BR> # BIT5 - Enable DeadLoop as ASSERT.<BR> # @Prompt Debug Property. # @Expression 0x80000002 | (gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask & 0xC0) == 0 gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0|UINT8|0x00000005 3c: Another approach is to use multiple INF files and select the one needed for debug/release in DSC file. If these techniques, or other techniques that other community Member may be using do not work for your use cases, and Feature Flag Expressions are the best approach, then Bugzillas Can be entered with supporting use cases to justify adding the feature to BaseTools. Thanks, Mike > -----Original Message----- > From: edk2-devel [mailto:edk2-devel- > bounces@lists.01.org] On Behalf Of > KarunakarPoosapalli@Dell.com > Sent: Thursday, January 10, 2019 10:34 PM > To: Kinney, Michael D <michael.d.kinney@intel.com>; Gao, > Liming <liming.gao@intel.com>; lersek@redhat.com; edk2- > devel@lists.01.org > Cc: Sumanth.Vidyadhara@dell.com; Shekar.Babu.S@dell.com; > Gao, Liming <liming.gao@intel.com>; > Sriramkumar.Raju@dell.com > Subject: Re: [edk2] Conditional Compilation support in > INF file > > 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 support in current edk2 > source? > 2. If not, could you please help in providing more > detailed spec/Doc to verify this support. > 3. Below are the few of use cases we're looking for, Did > really FeatureFlagExpression support all of this? > a. If we've this support we can add different > protocols in DEPEX section, like we can put condition > check and add rotococol1 for Notebook and Protocol2 for > Desktop. > b. Help in simplifying build files. We > could dispense with the prefix to inf files and more > developer convenient. > c. Sometimes we would like to add Conditional .C > and .H for file inclusion. Helps in our Debug / release > builds as well.. > Example; we do have release and debug > build, although Source Section has - IA32,X64, Common, > IPF, EBC exclusively. > 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 the BaseTools to support Condition > checks and MACRO support? > > Thanks & Regards, > Karunakar > > -----Original Message----- > From: Kinney, Michael D > [mailto:michael.d.kinney@intel.com] > Sent: Thursday, January 10, 2019 10:23 PM > To: Gao, Liming; Laszlo Ersek; Poosapalli, Karunakar; > edk2-devel@lists.01.org; Kinney, Michael D > Cc: Vidyadhara, Sumanth; Gao, Liming; Raju, SriramKumar > Subject: RE: [edk2] Conditional Compilation support in > INF file > > > [EXTERNAL EMAIL] > > There is one additional constraint for adding > conditionals to INF files. > > The UEFI Distribution Packaging Specification defines a > format to share package 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_P > ackage_Spec_1_1.pdf > > If we define extensions to INF or DEC files, we need to > make sure these transforms are still supported. If an > extension prevents these transforms, then we either need > to change the extension to be compatible or work on an > update 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 <lersek@redhat.com>; > > KarunakarPoosapalli@Dell.com; edk2-devel@lists.01.org > > Cc: Sumanth.Vidyadhara@dell.com; Gao, Liming > <liming.gao@intel.com>; > > Sriramkumar.Raju@dell.com > > Subject: Re: [edk2] Conditional Compilation support in > INF file > > > > I have same question. What flexibility is expected in > INF? I see one > > request in [Depex] section. So, PCD support in [Depex] > is added. > > > > Edk2 INF is used to describe the source code behavior. > > If the source uses Ppi/Protocol/Guid/Pcd, these > information are always > > required to be described in INF file. The compiler can > optimize the > > code and remove the unused Ppi/Protocol/Guid/Pcd. It > doesn't need > > developer specify the conditional statement. > > > > 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 > > <liming.gao@intel.com>; 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 > > 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 > > 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 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Conditional Compilation support in INF file 2019-01-11 18:54 ` Kinney, Michael D @ 2019-01-15 15:10 ` Gao, Liming 2019-01-28 7:50 ` KarunakarPoosapalli 2019-01-28 8:36 ` KarunakarPoosapalli 0 siblings, 2 replies; 16+ messages in thread From: Gao, Liming @ 2019-01-15 15:10 UTC (permalink / raw) To: Kinney, Michael D, KarunakarPoosapalli@Dell.com, lersek@redhat.com, edk2-devel@lists.01.org Cc: Sumanth.Vidyadhara@dell.com, Shekar.Babu.S@dell.com, Sriramkumar.Raju@dell.com Karunakar and Mike: Basetools doesn't support Feature Flag Expressions in INF file. It just ignores them. Because there are other solutions, I would like to propose to update INF spec to remove Feature Flag Expressions and avoid the confuse. Thanks Liming > -----Original Message----- > From: Kinney, Michael D > Sent: Saturday, January 12, 2019 2:54 AM > To: KarunakarPoosapalli@Dell.com; Gao, Liming <liming.gao@intel.com>; lersek@redhat.com; edk2-devel@lists.01.org; Kinney, > Michael D <michael.d.kinney@intel.com> > Cc: Sumanth.Vidyadhara@dell.com; Shekar.Babu.S@dell.com; Gao, Liming <liming.gao@intel.com>; Sriramkumar.Raju@dell.com > Subject: RE: [edk2] Conditional Compilation support in INF file > > Karunakar, > > Feature Flag Expressions is a concept that is defined in the > specs, but is a feature that is not fully implemented. Liming > should be able to provide details on what has been implemented > and validated in BaseTools. I think the reason that this feature > has not been implemented fully is that we have been able to find > alternate ways to get the equivalent results. Here are a few > example techniques: > > 3a: One approach is to use multiple INF files and select the > Right INF for different types of platform builds in DSC file. > If multiple modules share source files but have different > elements produced/consumed/depex, then multiple INF > file is an approach that makes the produced/consumed/depex > clear and is compatible with UDP Spec. > > 3c: One approach is to use DEBUG_CODE(), DEBUG_CODE_BEGIN(), > and DEBUG_CODE_END() macros in a single version of the > source files and enable/disable the debug code using BIT2 > in the following PCD: > > ## The mask is used to control DebugLib behavior.<BR><BR> > # BIT0 - Enable Debug Assert.<BR> > # BIT1 - Enable Debug Print.<BR> > # BIT2 - Enable Debug Code.<BR> > # BIT3 - Enable Clear Memory.<BR> > # BIT4 - Enable BreakPoint as ASSERT.<BR> > # BIT5 - Enable DeadLoop as ASSERT.<BR> > # @Prompt Debug Property. > # @Expression 0x80000002 | (gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask & 0xC0) == 0 > gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0|UINT8|0x00000005 > > 3c: Another approach is to use multiple INF files and select > the one needed for debug/release in DSC file. > > If these techniques, or other techniques that other community > Member may be using do not work for your use cases, and > Feature Flag Expressions are the best approach, then Bugzillas > Can be entered with supporting use cases to justify adding the > feature to BaseTools. > > Thanks, > > Mike > > > -----Original Message----- > > From: edk2-devel [mailto:edk2-devel- > > bounces@lists.01.org] On Behalf Of > > KarunakarPoosapalli@Dell.com > > Sent: Thursday, January 10, 2019 10:34 PM > > To: Kinney, Michael D <michael.d.kinney@intel.com>; Gao, > > Liming <liming.gao@intel.com>; lersek@redhat.com; edk2- > > devel@lists.01.org > > Cc: Sumanth.Vidyadhara@dell.com; Shekar.Babu.S@dell.com; > > Gao, Liming <liming.gao@intel.com>; > > Sriramkumar.Raju@dell.com > > Subject: Re: [edk2] Conditional Compilation support in > > INF file > > > > 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 support in current edk2 > > source? > > 2. If not, could you please help in providing more > > detailed spec/Doc to verify this support. > > 3. Below are the few of use cases we're looking for, Did > > really FeatureFlagExpression support all of this? > > a. If we've this support we can add different > > protocols in DEPEX section, like we can put condition > > check and add rotococol1 for Notebook and Protocol2 for > > Desktop. > > b. Help in simplifying build files. We > > could dispense with the prefix to inf files and more > > developer convenient. > > c. Sometimes we would like to add Conditional .C > > and .H for file inclusion. Helps in our Debug / release > > builds as well.. > > Example; we do have release and debug > > build, although Source Section has - IA32,X64, Common, > > IPF, EBC exclusively. > > 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 the BaseTools to support Condition > > checks and MACRO support? > > > > Thanks & Regards, > > Karunakar > > > > -----Original Message----- > > From: Kinney, Michael D > > [mailto:michael.d.kinney@intel.com] > > Sent: Thursday, January 10, 2019 10:23 PM > > To: Gao, Liming; Laszlo Ersek; Poosapalli, Karunakar; > > edk2-devel@lists.01.org; Kinney, Michael D > > Cc: Vidyadhara, Sumanth; Gao, Liming; Raju, SriramKumar > > Subject: RE: [edk2] Conditional Compilation support in > > INF file > > > > > > [EXTERNAL EMAIL] > > > > There is one additional constraint for adding > > conditionals to INF files. > > > > The UEFI Distribution Packaging Specification defines a > > format to share package 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_P > > ackage_Spec_1_1.pdf > > > > If we define extensions to INF or DEC files, we need to > > make sure these transforms are still supported. If an > > extension prevents these transforms, then we either need > > to change the extension to be compatible or work on an > > update 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 <lersek@redhat.com>; > > > KarunakarPoosapalli@Dell.com; edk2-devel@lists.01.org > > > Cc: Sumanth.Vidyadhara@dell.com; Gao, Liming > > <liming.gao@intel.com>; > > > Sriramkumar.Raju@dell.com > > > Subject: Re: [edk2] Conditional Compilation support in > > INF file > > > > > > I have same question. What flexibility is expected in > > INF? I see one > > > request in [Depex] section. So, PCD support in [Depex] > > is added. > > > > > > Edk2 INF is used to describe the source code behavior. > > > If the source uses Ppi/Protocol/Guid/Pcd, these > > information are always > > > required to be described in INF file. The compiler can > > optimize the > > > code and remove the unused Ppi/Protocol/Guid/Pcd. It > > doesn't need > > > developer specify the conditional statement. > > > > > > 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 > > > <liming.gao@intel.com>; 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 > > > 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 > > > 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 > > _______________________________________________ > > edk2-devel mailing list > > edk2-devel@lists.01.org > > https://lists.01.org/mailman/listinfo/edk2-devel ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Conditional Compilation support in INF file 2019-01-15 15:10 ` Gao, Liming @ 2019-01-28 7:50 ` KarunakarPoosapalli 2019-01-28 8:36 ` KarunakarPoosapalli 1 sibling, 0 replies; 16+ messages in thread From: KarunakarPoosapalli @ 2019-01-28 7:50 UTC (permalink / raw) To: liming.gao, michael.d.kinney, lersek, edk2-devel Cc: Sumanth.Vidyadhara, Shekar.Babu.S, Sriramkumar.Raju Hi Liming/Mike and All, 1. Is there any plan for adding 'Feature Flag Expressions' support to Basetools? Please let me know if you want to me to create ticket in BugZilla and work on it. 2. If Feature Flag Expressions is NOT supported in current INF version, Can we update INF spec until we provide this support. Please let me know to initiate the process for updating the INF spec or let me know to create the ECR. 3. Thanks for giving alternative ways to achieve the goal. If we're planning to provide the Feature Flag Expressions support, I would like to suggest to add 'Conditional compilation' support to BaseTools, So that it can provide all the requirements. Thanks & Regards, Karunakar -----Original Message----- From: Gao, Liming [mailto:liming.gao@intel.com] Sent: Tuesday, January 15, 2019 8:40 PM To: Kinney, Michael D; Poosapalli, Karunakar; lersek@redhat.com; edk2-devel@lists.01.org Cc: Vidyadhara, Sumanth; S, Shekar Babu; Raju, SriramKumar Subject: RE: [edk2] Conditional Compilation support in INF file [EXTERNAL EMAIL] Karunakar and Mike: Basetools doesn't support Feature Flag Expressions in INF file. It just ignores them. Because there are other solutions, I would like to propose to update INF spec to remove Feature Flag Expressions and avoid the confuse. Thanks Liming > -----Original Message----- > From: Kinney, Michael D > Sent: Saturday, January 12, 2019 2:54 AM > To: KarunakarPoosapalli@Dell.com; Gao, Liming <liming.gao@intel.com>; > lersek@redhat.com; edk2-devel@lists.01.org; Kinney, Michael D > <michael.d.kinney@intel.com> > Cc: Sumanth.Vidyadhara@dell.com; Shekar.Babu.S@dell.com; Gao, Liming > <liming.gao@intel.com>; Sriramkumar.Raju@dell.com > Subject: RE: [edk2] Conditional Compilation support in INF file > > Karunakar, > > Feature Flag Expressions is a concept that is defined in the specs, > but is a feature that is not fully implemented. Liming should be able > to provide details on what has been implemented and validated in > BaseTools. I think the reason that this feature has not been > implemented fully is that we have been able to find alternate ways to > get the equivalent results. Here are a few example techniques: > > 3a: One approach is to use multiple INF files and select the > Right INF for different types of platform builds in DSC file. > If multiple modules share source files but have different > elements produced/consumed/depex, then multiple INF > file is an approach that makes the produced/consumed/depex > clear and is compatible with UDP Spec. > > 3c: One approach is to use DEBUG_CODE(), DEBUG_CODE_BEGIN(), > and DEBUG_CODE_END() macros in a single version of the > source files and enable/disable the debug code using BIT2 > in the following PCD: > > ## The mask is used to control DebugLib behavior.<BR><BR> > # BIT0 - Enable Debug Assert.<BR> > # BIT1 - Enable Debug Print.<BR> > # BIT2 - Enable Debug Code.<BR> > # BIT3 - Enable Clear Memory.<BR> > # BIT4 - Enable BreakPoint as ASSERT.<BR> > # BIT5 - Enable DeadLoop as ASSERT.<BR> > # @Prompt Debug Property. > # @Expression 0x80000002 | (gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask & 0xC0) == 0 > gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0|UINT8|0x00000005 > > 3c: Another approach is to use multiple INF files and select > the one needed for debug/release in DSC file. > > If these techniques, or other techniques that other community Member > may be using do not work for your use cases, and Feature Flag > Expressions are the best approach, then Bugzillas Can be entered with > supporting use cases to justify adding the feature to BaseTools. > > Thanks, > > Mike > > > -----Original Message----- > > From: edk2-devel [mailto:edk2-devel- bounces@lists.01.org] On Behalf > > Of KarunakarPoosapalli@Dell.com > > Sent: Thursday, January 10, 2019 10:34 PM > > To: Kinney, Michael D <michael.d.kinney@intel.com>; Gao, Liming > > <liming.gao@intel.com>; lersek@redhat.com; edk2- devel@lists.01.org > > Cc: Sumanth.Vidyadhara@dell.com; Shekar.Babu.S@dell.com; Gao, Liming > > <liming.gao@intel.com>; Sriramkumar.Raju@dell.com > > Subject: Re: [edk2] Conditional Compilation support in INF file > > > > 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 support in current edk2 source? > > 2. If not, could you please help in providing more detailed spec/Doc > > to verify this support. > > 3. Below are the few of use cases we're looking for, Did really > > FeatureFlagExpression support all of this? > > a. If we've this support we can add different > > protocols in DEPEX section, like we can put condition check and add > > rotococol1 for Notebook and Protocol2 for Desktop. > > b. Help in simplifying build files. We > > could dispense with the prefix to inf files and more developer > > convenient. > > c. Sometimes we would like to add Conditional .C > > and .H for file inclusion. Helps in our Debug / release builds as > > well.. > > Example; we do have release and debug build, although Source > > Section has - IA32,X64, Common, IPF, EBC exclusively. > > 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 the BaseTools to support Condition checks and MACRO > > support? > > > > Thanks & Regards, > > Karunakar > > > > -----Original Message----- > > From: Kinney, Michael D > > [mailto:michael.d.kinney@intel.com] > > Sent: Thursday, January 10, 2019 10:23 PM > > To: Gao, Liming; Laszlo Ersek; Poosapalli, Karunakar; > > edk2-devel@lists.01.org; Kinney, Michael D > > Cc: Vidyadhara, Sumanth; Gao, Liming; Raju, SriramKumar > > Subject: RE: [edk2] Conditional Compilation support in INF file > > > > > > [EXTERNAL EMAIL] > > > > There is one additional constraint for adding conditionals to INF > > files. > > > > The UEFI Distribution Packaging Specification defines a format to > > share package 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_P > > ackage_Spec_1_1.pdf > > > > If we define extensions to INF or DEC files, we need to make sure > > these transforms are still supported. If an extension prevents > > these transforms, then we either need to change the extension to be > > compatible or work on an update 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 <lersek@redhat.com>; > > > KarunakarPoosapalli@Dell.com; edk2-devel@lists.01.org > > > Cc: Sumanth.Vidyadhara@dell.com; Gao, Liming > > <liming.gao@intel.com>; > > > Sriramkumar.Raju@dell.com > > > Subject: Re: [edk2] Conditional Compilation support in > > INF file > > > > > > I have same question. What flexibility is expected in > > INF? I see one > > > request in [Depex] section. So, PCD support in [Depex] > > is added. > > > > > > Edk2 INF is used to describe the source code behavior. > > > If the source uses Ppi/Protocol/Guid/Pcd, these > > information are always > > > required to be described in INF file. The compiler can > > optimize the > > > code and remove the unused Ppi/Protocol/Guid/Pcd. It > > doesn't need > > > developer specify the conditional statement. > > > > > > 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 > > > <liming.gao@intel.com>; 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 > > > 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 > > > 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 > > _______________________________________________ > > edk2-devel mailing list > > edk2-devel@lists.01.org > > https://lists.01.org/mailman/listinfo/edk2-devel ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Conditional Compilation support in INF file 2019-01-15 15:10 ` Gao, Liming 2019-01-28 7:50 ` KarunakarPoosapalli @ 2019-01-28 8:36 ` KarunakarPoosapalli 2019-01-31 6:56 ` Gao, Liming 1 sibling, 1 reply; 16+ messages in thread From: KarunakarPoosapalli @ 2019-01-28 8:36 UTC (permalink / raw) To: liming.gao, michael.d.kinney, lersek, edk2-devel Cc: Sumanth.Vidyadhara, Shekar.Babu.S, Sriramkumar.Raju, Anand.Joshi +Team. -----Original Message----- From: Poosapalli, Karunakar Sent: Monday, January 28, 2019 1:20 PM To: 'Gao, Liming'; Kinney, Michael D; lersek@redhat.com; edk2-devel@lists.01.org Cc: Vidyadhara, Sumanth; S, Shekar Babu; Raju, SriramKumar Subject: RE: [edk2] Conditional Compilation support in INF file Hi Liming/Mike and All, 1. Is there any plan for adding 'Feature Flag Expressions' support to Basetools? Please let me know if you want to me to create ticket in BugZilla and work on it. 2. If Feature Flag Expressions is NOT supported in current INF version, Can we update INF spec until we provide this support. Please let me know to initiate the process for updating the INF spec or let me know to create the ECR. 3. Thanks for giving alternative ways to achieve the goal. If we're planning to provide the Feature Flag Expressions support, I would like to suggest to add 'Conditional compilation' support to BaseTools, So that it can provide all the requirements. Thanks & Regards, Karunakar -----Original Message----- From: Gao, Liming [mailto:liming.gao@intel.com] Sent: Tuesday, January 15, 2019 8:40 PM To: Kinney, Michael D; Poosapalli, Karunakar; lersek@redhat.com; edk2-devel@lists.01.org Cc: Vidyadhara, Sumanth; S, Shekar Babu; Raju, SriramKumar Subject: RE: [edk2] Conditional Compilation support in INF file [EXTERNAL EMAIL] Karunakar and Mike: Basetools doesn't support Feature Flag Expressions in INF file. It just ignores them. Because there are other solutions, I would like to propose to update INF spec to remove Feature Flag Expressions and avoid the confuse. Thanks Liming > -----Original Message----- > From: Kinney, Michael D > Sent: Saturday, January 12, 2019 2:54 AM > To: KarunakarPoosapalli@Dell.com; Gao, Liming <liming.gao@intel.com>; > lersek@redhat.com; edk2-devel@lists.01.org; Kinney, Michael D > <michael.d.kinney@intel.com> > Cc: Sumanth.Vidyadhara@dell.com; Shekar.Babu.S@dell.com; Gao, Liming > <liming.gao@intel.com>; Sriramkumar.Raju@dell.com > Subject: RE: [edk2] Conditional Compilation support in INF file > > Karunakar, > > Feature Flag Expressions is a concept that is defined in the specs, > but is a feature that is not fully implemented. Liming should be able > to provide details on what has been implemented and validated in > BaseTools. I think the reason that this feature has not been > implemented fully is that we have been able to find alternate ways to > get the equivalent results. Here are a few example techniques: > > 3a: One approach is to use multiple INF files and select the > Right INF for different types of platform builds in DSC file. > If multiple modules share source files but have different > elements produced/consumed/depex, then multiple INF > file is an approach that makes the produced/consumed/depex > clear and is compatible with UDP Spec. > > 3c: One approach is to use DEBUG_CODE(), DEBUG_CODE_BEGIN(), > and DEBUG_CODE_END() macros in a single version of the > source files and enable/disable the debug code using BIT2 > in the following PCD: > > ## The mask is used to control DebugLib behavior.<BR><BR> > # BIT0 - Enable Debug Assert.<BR> > # BIT1 - Enable Debug Print.<BR> > # BIT2 - Enable Debug Code.<BR> > # BIT3 - Enable Clear Memory.<BR> > # BIT4 - Enable BreakPoint as ASSERT.<BR> > # BIT5 - Enable DeadLoop as ASSERT.<BR> > # @Prompt Debug Property. > # @Expression 0x80000002 | (gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask & 0xC0) == 0 > gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0|UINT8|0x00000005 > > 3c: Another approach is to use multiple INF files and select > the one needed for debug/release in DSC file. > > If these techniques, or other techniques that other community Member > may be using do not work for your use cases, and Feature Flag > Expressions are the best approach, then Bugzillas Can be entered with > supporting use cases to justify adding the feature to BaseTools. > > Thanks, > > Mike > > > -----Original Message----- > > From: edk2-devel [mailto:edk2-devel- bounces@lists.01.org] On Behalf > > Of KarunakarPoosapalli@Dell.com > > Sent: Thursday, January 10, 2019 10:34 PM > > To: Kinney, Michael D <michael.d.kinney@intel.com>; Gao, Liming > > <liming.gao@intel.com>; lersek@redhat.com; edk2- devel@lists.01.org > > Cc: Sumanth.Vidyadhara@dell.com; Shekar.Babu.S@dell.com; Gao, Liming > > <liming.gao@intel.com>; Sriramkumar.Raju@dell.com > > Subject: Re: [edk2] Conditional Compilation support in INF file > > > > 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 support in current edk2 source? > > 2. If not, could you please help in providing more detailed spec/Doc > > to verify this support. > > 3. Below are the few of use cases we're looking for, Did really > > FeatureFlagExpression support all of this? > > a. If we've this support we can add different > > protocols in DEPEX section, like we can put condition check and add > > rotococol1 for Notebook and Protocol2 for Desktop. > > b. Help in simplifying build files. We > > could dispense with the prefix to inf files and more developer > > convenient. > > c. Sometimes we would like to add Conditional .C > > and .H for file inclusion. Helps in our Debug / release builds as > > well.. > > Example; we do have release and debug build, although Source > > Section has - IA32,X64, Common, IPF, EBC exclusively. > > 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 the BaseTools to support Condition checks and MACRO > > support? > > > > Thanks & Regards, > > Karunakar > > > > -----Original Message----- > > From: Kinney, Michael D > > [mailto:michael.d.kinney@intel.com] > > Sent: Thursday, January 10, 2019 10:23 PM > > To: Gao, Liming; Laszlo Ersek; Poosapalli, Karunakar; > > edk2-devel@lists.01.org; Kinney, Michael D > > Cc: Vidyadhara, Sumanth; Gao, Liming; Raju, SriramKumar > > Subject: RE: [edk2] Conditional Compilation support in INF file > > > > > > [EXTERNAL EMAIL] > > > > There is one additional constraint for adding conditionals to INF > > files. > > > > The UEFI Distribution Packaging Specification defines a format to > > share package 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_P > > ackage_Spec_1_1.pdf > > > > If we define extensions to INF or DEC files, we need to make sure > > these transforms are still supported. If an extension prevents > > these transforms, then we either need to change the extension to be > > compatible or work on an update 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 <lersek@redhat.com>; > > > KarunakarPoosapalli@Dell.com; edk2-devel@lists.01.org > > > Cc: Sumanth.Vidyadhara@dell.com; Gao, Liming > > <liming.gao@intel.com>; > > > Sriramkumar.Raju@dell.com > > > Subject: Re: [edk2] Conditional Compilation support in > > INF file > > > > > > I have same question. What flexibility is expected in > > INF? I see one > > > request in [Depex] section. So, PCD support in [Depex] > > is added. > > > > > > Edk2 INF is used to describe the source code behavior. > > > If the source uses Ppi/Protocol/Guid/Pcd, these > > information are always > > > required to be described in INF file. The compiler can > > optimize the > > > code and remove the unused Ppi/Protocol/Guid/Pcd. It > > doesn't need > > > developer specify the conditional statement. > > > > > > 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 > > > <liming.gao@intel.com>; 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 > > > 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 > > > 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 > > _______________________________________________ > > edk2-devel mailing list > > edk2-devel@lists.01.org > > https://lists.01.org/mailman/listinfo/edk2-devel ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Conditional Compilation support in INF file 2019-01-28 8:36 ` KarunakarPoosapalli @ 2019-01-31 6:56 ` Gao, Liming 2019-01-31 16:26 ` stephano 0 siblings, 1 reply; 16+ messages in thread From: Gao, Liming @ 2019-01-31 6:56 UTC (permalink / raw) To: KarunakarPoosapalli@Dell.com, Kinney, Michael D, lersek@redhat.com, edk2-devel@lists.01.org, stephano Cc: Sumanth.Vidyadhara@dell.com, Shekar.Babu.S@dell.com, Sriramkumar.Raju@dell.com, Anand.Joshi@dell.com Karunakar: There is one BZ https://bugzilla.tianocore.org/show_bug.cgi?id=1446 on Feature Flag expression in INF. INF spec has listed the syntax for it. But, BaseTools doesn't support it now. If you have the similar request, please add the information in BZ (including the usage model and expected edk2 release). And, stephano are working on Public Design and Bug Scrub Meetings. Then, we can talk the fix plan in public bug scrub meeting. Thanks Liming > -----Original Message----- > From: KarunakarPoosapalli@Dell.com [mailto:KarunakarPoosapalli@Dell.com] > Sent: Monday, January 28, 2019 4:36 PM > To: Gao, Liming <liming.gao@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>; lersek@redhat.com; edk2-devel@lists.01.org > Cc: Sumanth.Vidyadhara@dell.com; Shekar.Babu.S@dell.com; Sriramkumar.Raju@dell.com; Anand.Joshi@dell.com > Subject: RE: [edk2] Conditional Compilation support in INF file > > +Team. > > -----Original Message----- > From: Poosapalli, Karunakar > Sent: Monday, January 28, 2019 1:20 PM > To: 'Gao, Liming'; Kinney, Michael D; lersek@redhat.com; edk2-devel@lists.01.org > Cc: Vidyadhara, Sumanth; S, Shekar Babu; Raju, SriramKumar > Subject: RE: [edk2] Conditional Compilation support in INF file > > Hi Liming/Mike and All, > > 1. Is there any plan for adding 'Feature Flag Expressions' support to Basetools? > Please let me know if you want to me to create ticket in BugZilla and work on it. > 2. If Feature Flag Expressions is NOT supported in current INF version, Can we update INF spec until we provide this support. > Please let me know to initiate the process for updating the INF spec or let me know to create the ECR. > 3. Thanks for giving alternative ways to achieve the goal. > If we're planning to provide the Feature Flag Expressions support, I would like to suggest to add 'Conditional compilation' > support to BaseTools, So that it can provide all the requirements. > > Thanks & Regards, > Karunakar > > -----Original Message----- > From: Gao, Liming [mailto:liming.gao@intel.com] > Sent: Tuesday, January 15, 2019 8:40 PM > To: Kinney, Michael D; Poosapalli, Karunakar; lersek@redhat.com; edk2-devel@lists.01.org > Cc: Vidyadhara, Sumanth; S, Shekar Babu; Raju, SriramKumar > Subject: RE: [edk2] Conditional Compilation support in INF file > > > [EXTERNAL EMAIL] > > Karunakar and Mike: > Basetools doesn't support Feature Flag Expressions in INF file. It just ignores them. Because there are other solutions, I would like to > propose to update INF spec to remove Feature Flag Expressions and avoid the confuse. > > Thanks > Liming > > -----Original Message----- > > From: Kinney, Michael D > > Sent: Saturday, January 12, 2019 2:54 AM > > To: KarunakarPoosapalli@Dell.com; Gao, Liming <liming.gao@intel.com>; > > lersek@redhat.com; edk2-devel@lists.01.org; Kinney, Michael D > > <michael.d.kinney@intel.com> > > Cc: Sumanth.Vidyadhara@dell.com; Shekar.Babu.S@dell.com; Gao, Liming > > <liming.gao@intel.com>; Sriramkumar.Raju@dell.com > > Subject: RE: [edk2] Conditional Compilation support in INF file > > > > Karunakar, > > > > Feature Flag Expressions is a concept that is defined in the specs, > > but is a feature that is not fully implemented. Liming should be able > > to provide details on what has been implemented and validated in > > BaseTools. I think the reason that this feature has not been > > implemented fully is that we have been able to find alternate ways to > > get the equivalent results. Here are a few example techniques: > > > > 3a: One approach is to use multiple INF files and select the > > Right INF for different types of platform builds in DSC file. > > If multiple modules share source files but have different > > elements produced/consumed/depex, then multiple INF > > file is an approach that makes the produced/consumed/depex > > clear and is compatible with UDP Spec. > > > > 3c: One approach is to use DEBUG_CODE(), DEBUG_CODE_BEGIN(), > > and DEBUG_CODE_END() macros in a single version of the > > source files and enable/disable the debug code using BIT2 > > in the following PCD: > > > > ## The mask is used to control DebugLib behavior.<BR><BR> > > # BIT0 - Enable Debug Assert.<BR> > > # BIT1 - Enable Debug Print.<BR> > > # BIT2 - Enable Debug Code.<BR> > > # BIT3 - Enable Clear Memory.<BR> > > # BIT4 - Enable BreakPoint as ASSERT.<BR> > > # BIT5 - Enable DeadLoop as ASSERT.<BR> > > # @Prompt Debug Property. > > # @Expression 0x80000002 | (gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask & 0xC0) == 0 > > gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0|UINT8|0x00000005 > > > > 3c: Another approach is to use multiple INF files and select > > the one needed for debug/release in DSC file. > > > > If these techniques, or other techniques that other community Member > > may be using do not work for your use cases, and Feature Flag > > Expressions are the best approach, then Bugzillas Can be entered with > > supporting use cases to justify adding the feature to BaseTools. > > > > Thanks, > > > > Mike > > > > > -----Original Message----- > > > From: edk2-devel [mailto:edk2-devel- bounces@lists.01.org] On Behalf > > > Of KarunakarPoosapalli@Dell.com > > > Sent: Thursday, January 10, 2019 10:34 PM > > > To: Kinney, Michael D <michael.d.kinney@intel.com>; Gao, Liming > > > <liming.gao@intel.com>; lersek@redhat.com; edk2- devel@lists.01.org > > > Cc: Sumanth.Vidyadhara@dell.com; Shekar.Babu.S@dell.com; Gao, Liming > > > <liming.gao@intel.com>; Sriramkumar.Raju@dell.com > > > Subject: Re: [edk2] Conditional Compilation support in INF file > > > > > > 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 support in current edk2 source? > > > 2. If not, could you please help in providing more detailed spec/Doc > > > to verify this support. > > > 3. Below are the few of use cases we're looking for, Did really > > > FeatureFlagExpression support all of this? > > > a. If we've this support we can add different > > > protocols in DEPEX section, like we can put condition check and add > > > rotococol1 for Notebook and Protocol2 for Desktop. > > > b. Help in simplifying build files. We > > > could dispense with the prefix to inf files and more developer > > > convenient. > > > c. Sometimes we would like to add Conditional .C > > > and .H for file inclusion. Helps in our Debug / release builds as > > > well.. > > > Example; we do have release and debug build, although Source > > > Section has - IA32,X64, Common, IPF, EBC exclusively. > > > 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 the BaseTools to support Condition checks and MACRO > > > support? > > > > > > Thanks & Regards, > > > Karunakar > > > > > > -----Original Message----- > > > From: Kinney, Michael D > > > [mailto:michael.d.kinney@intel.com] > > > Sent: Thursday, January 10, 2019 10:23 PM > > > To: Gao, Liming; Laszlo Ersek; Poosapalli, Karunakar; > > > edk2-devel@lists.01.org; Kinney, Michael D > > > Cc: Vidyadhara, Sumanth; Gao, Liming; Raju, SriramKumar > > > Subject: RE: [edk2] Conditional Compilation support in INF file > > > > > > > > > [EXTERNAL EMAIL] > > > > > > There is one additional constraint for adding conditionals to INF > > > files. > > > > > > The UEFI Distribution Packaging Specification defines a format to > > > share package 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_P > > > ackage_Spec_1_1.pdf > > > > > > If we define extensions to INF or DEC files, we need to make sure > > > these transforms are still supported. If an extension prevents > > > these transforms, then we either need to change the extension to be > > > compatible or work on an update 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 <lersek@redhat.com>; > > > > KarunakarPoosapalli@Dell.com; edk2-devel@lists.01.org > > > > Cc: Sumanth.Vidyadhara@dell.com; Gao, Liming > > > <liming.gao@intel.com>; > > > > Sriramkumar.Raju@dell.com > > > > Subject: Re: [edk2] Conditional Compilation support in > > > INF file > > > > > > > > I have same question. What flexibility is expected in > > > INF? I see one > > > > request in [Depex] section. So, PCD support in [Depex] > > > is added. > > > > > > > > Edk2 INF is used to describe the source code behavior. > > > > If the source uses Ppi/Protocol/Guid/Pcd, these > > > information are always > > > > required to be described in INF file. The compiler can > > > optimize the > > > > code and remove the unused Ppi/Protocol/Guid/Pcd. It > > > doesn't need > > > > developer specify the conditional statement. > > > > > > > > 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 > > > > <liming.gao@intel.com>; 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 > > > > 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 > > > > 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 > > > _______________________________________________ > > > edk2-devel mailing list > > > edk2-devel@lists.01.org > > > https://lists.01.org/mailman/listinfo/edk2-devel ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Conditional Compilation support in INF file 2019-01-31 6:56 ` Gao, Liming @ 2019-01-31 16:26 ` stephano 2019-02-01 10:52 ` KarunakarPoosapalli 0 siblings, 1 reply; 16+ messages in thread From: stephano @ 2019-01-31 16:26 UTC (permalink / raw) To: Gao, Liming, KarunakarPoosapalli@Dell.com, Kinney, Michael D, lersek@redhat.com, edk2-devel@lists.01.org Cc: Sumanth.Vidyadhara@dell.com, Shekar.Babu.S@dell.com, Sriramkumar.Raju@dell.com, Anand.Joshi@dell.com On 1/30/2019 10:56 PM, Gao, Liming wrote: > Karunakar: > There is one BZ https://bugzilla.tianocore.org/show_bug.cgi?id=1446 on Feature Flag expression in INF. INF spec has listed the syntax for it. But, BaseTools doesn't support it now. If you have the similar request, please add the information in BZ (including the usage model and expected edk2 release). And, stephano are working on Public Design and Bug Scrub Meetings. Then, we can talk the fix plan in public bug scrub meeting. > Design and Community Bug Triage meetings are indeed in the works. I should have notifications out to the mailing list soon. I am traveling to FOSDEM today, so I should have an email out by the weekend. Cheers, Stephano ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Conditional Compilation support in INF file 2019-01-31 16:26 ` stephano @ 2019-02-01 10:52 ` KarunakarPoosapalli 0 siblings, 0 replies; 16+ messages in thread From: KarunakarPoosapalli @ 2019-02-01 10:52 UTC (permalink / raw) To: stephano.cetola, liming.gao, michael.d.kinney, lersek, edk2-devel Cc: Sumanth.Vidyadhara, Shekar.Babu.S, Sriramkumar.Raju, Anand.Joshi Hi Stephano, I've updated the comment in BugZill 1446. Can you please send invite for Bug Scrub meetings to discuss on it. Thanks & Regards, karunakar -----Original Message----- From: stephano [mailto:stephano.cetola@linux.intel.com] Sent: Thursday, January 31, 2019 9:57 PM To: Gao, Liming; Poosapalli, Karunakar; Kinney, Michael D; lersek@redhat.com; edk2-devel@lists.01.org Cc: Vidyadhara, Sumanth; S, Shekar Babu; Raju, SriramKumar; Joshi, Anand Subject: Re: [edk2] Conditional Compilation support in INF file [EXTERNAL EMAIL] On 1/30/2019 10:56 PM, Gao, Liming wrote: > Karunakar: > There is one BZ https://bugzilla.tianocore.org/show_bug.cgi?id=1446 on Feature Flag expression in INF. INF spec has listed the syntax for it. But, BaseTools doesn't support it now. If you have the similar request, please add the information in BZ (including the usage model and expected edk2 release). And, stephano are working on Public Design and Bug Scrub Meetings. Then, we can talk the fix plan in public bug scrub meeting. > Design and Community Bug Triage meetings are indeed in the works. I should have notifications out to the mailing list soon. I am traveling to FOSDEM today, so I should have an email out by the weekend. Cheers, Stephano ^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2019-02-01 10:52 UTC | newest] Thread overview: 16+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2019-01-09 6:55 Conditional Compilation support in INF file KarunakarPoosapalli 2019-01-09 11:00 ` Laszlo Ersek 2019-01-09 12:42 ` Gao, Liming 2019-01-09 14:37 ` Laszlo Ersek 2019-01-10 6:03 ` KarunakarPoosapalli 2019-01-10 12:54 ` Laszlo Ersek 2019-01-10 15:48 ` Gao, Liming 2019-01-10 16:53 ` Kinney, Michael D 2019-01-11 6:33 ` KarunakarPoosapalli 2019-01-11 18:54 ` Kinney, Michael D 2019-01-15 15:10 ` Gao, Liming 2019-01-28 7:50 ` KarunakarPoosapalli 2019-01-28 8:36 ` KarunakarPoosapalli 2019-01-31 6:56 ` Gao, Liming 2019-01-31 16:26 ` stephano 2019-02-01 10:52 ` KarunakarPoosapalli
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox