Branch: refs/heads/master
  Home:   https://github.com/tianocore/edk2
  Commit: d77efa2ebef9a0feca97df787138d132393e1130
      
https://github.com/tianocore/edk2/commit/d77efa2ebef9a0feca97df787138d132393e1130
  Author: Taylor Beebe <[email protected]>
  Date:   2024-04-15 (Mon, 15 Apr 2024)

  Changed paths:
    M BaseTools/Source/Python/Workspace/WorkspaceCommon.py

  Log Message:
  -----------
  BaseTools: Don't Recurse NULL Includes Not Linked to Module

When collecting the required library instances for modules and
libraries, included libraries will be recursed to ensure the module is
built with all the libraries directly linked to it and indirectly
linked to it via included libraries.

Using the following scenario as an example:

[LibraryClasses.common.DXE_CORE]
NULL|Path/To/Library1.inf // Includes DebugLib

[LibraryClasses.common.DXE_DRIVER]
NULL|Path/To/Library2.inf // Includes DebugLib

[LibraryClasses.common.DXE_CORE, LibraryClasses.common.DXE_DRIVER]
DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf

[Components]
MdeModulePkg/Core/Dxe/DxeMain.inf // Includes DebugLib

The DXE_CORE NULL library will be assigned a fake library class like
NULL1 and the DXE_DRIVER will be assigned NULL2. The recursion logic
will see NULL1 as a directly linked and will add an instance of it to
the list of libraries which need to be included in the module. When
DebugLib is evaluated, the recursion logic will add the libraries
DebugLib depends on to the queue which includes both NULL1 and NULL2.
When NULL2 is unqueued, an instance of it will also be added to the
list of libraries needed to build DxeMain which now means that both
NULL1 and NULL2 have been linked.

NULL includes outside of module overrides are not supported according
to the spec, but we do it anyways so this seems like a case which
should be fixed. This change updates the recursion logic to skip
evaluating NULL libraries unless they are linked directly to the
module/library being evaluated.

Cc: Rebecca Cran <[email protected]>
Cc: Liming Gao <[email protected]>
Cc: Bob Feng <[email protected]>
Cc: Yuwei Chen <[email protected]>

Signed-off-by: Taylor Beebe <[email protected]>
Reviewed-by: Liming Gao <[email protected]>


  Commit: 5ba3602e4580d6b65dacf4292a031627f93e1167
      
https://github.com/tianocore/edk2/commit/5ba3602e4580d6b65dacf4292a031627f93e1167
  Author: Taylor Beebe <[email protected]>
  Date:   2024-04-15 (Mon, 15 Apr 2024)

  Changed paths:
    M BaseTools/Source/Python/GenFds/FfsInfStatement.py
    M BaseTools/Source/Python/Workspace/WorkspaceCommon.py

  Log Message:
  -----------
  BaseTools: Use Stronger Matching for NULL Linked Libraries

To prevent the possibility that a library with a name like
NULLTestLib is interpreted as a NULL linked library, use
more explicit pattern matching to ensure that the library
name follows the pattern NULL%d.

Cc: Rebecca Cran <[email protected]>
Cc: Liming Gao <[email protected]>
Cc: Bob Feng <[email protected]>
Cc: Yuwei Chen <[email protected]>

Signed-off-by: Taylor Beebe <[email protected]>
Reviewed-by: Liming Gao <[email protected]>


Compare: https://github.com/tianocore/edk2/compare/0707d9296d75...5ba3602e4580

To unsubscribe from these emails, change your notification settings at 
https://github.com/tianocore/edk2/settings/notifications


_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to