Tim,

 

This is an excellent point.  I do not see any reason why the order should matter.  If there are any assumptions in BaseTools about the order, we should identify those and enter Bugzillas to remove those assumptions and update the specs to remove this requirement.

 

For some sections , the order of statements with a section is significant.

 

Thanks,

 

Mike

 

From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Tim Lewis
Sent: Wednesday, June 17, 2020 9:56 AM
To: devel@edk2.groups.io
Subject: [edk2-devel] Components sub-section ordering

 

EDK2 build tool gurus:

 

Question: The current EDK2 .DSC specification, section 3.10 says that the sub-elements in a Component must follow a specific ordering (LibraryClasses, Pcds*, BuildOptions). But it is not clear why this is required. As a side note, we have a number of .dsc files where this is not followed today, but our tools developers wanted to know if this should be enforced.

 

Here is the text from the spec:

 

Within the context of an EDK II module sub-element, the <LibraryClasses> entries must appear before <Pcds*> entries; the <LibraryClasses> entries terminate with the start of either the <Pcds*> or <BuildOptions> sub-section header or the end of the scope defined by the right curly "}" brace. The <BuildOptions> sub-element must be the last sub-entry of an EDK II module's scoped section. Entries for <LibraryClasses>, <Pcds*> and <BuildOptions> are used to replace the platform or global definition entries listed elsewhere. LibraryClass and PCDs are globally defined in the DSC file's [LibraryClasses] and [Pcds*] sections, while global BuildOptions may be specified in either the DSC file's [BuildOptions] section or in the $(WORKSPACE)/Conf/tools_def.txt file.

 

I would also note that the <Defines> is not listed here.

 

Can we just elide this?

 

Thanks,

 

Tim Lewis

CTO, Insyde Software

www.insyde.com