Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BaseTools: Disable Second DLINK step for WHOLEARCHIVE #1243

Merged
merged 2 commits into from
Dec 18, 2024

Conversation

os-d
Copy link
Contributor

@os-d os-d commented Dec 11, 2024

Description

Project Mu does not use WHOLEARCHIVE, due to issues in silicon partner code when it is enabled. In order to support WHOLEARCHIVE, edk2 added a second dlink step in the build rules to get the benefit of identifying duplicate symbols without needing the space expansion. This is an extra linking step for each module and so does increase build time. Without WHOLEARCHIVE, this is an unneeded step on Mu, so it is disabled here.

This additional linking step just is a test to verify that there are not duplicate symbols, the actual FW build is not changed here, that is what the second DLINK step does, without the DLINK2_FLAGS where WHOLEARCHIVE is set. HOST_APPLICATIONs still require WHOLEARCHIVE for the actual build, as GoogleTest requires it or could miss some unit tests, due to the complexities of a C++ build in the edk2 build system. UnitTestFrameworkPkgHost.dsc.inc sets this in the DLINK_FLAGS, not DLINK2_FLAGS, so this is still respected.

  • Impacts functionality?
  • Impacts security?
  • Breaking change?
  • Includes tests?
  • Includes documentation?
  • Backport to release branch?

How This Was Tested

CI build

Integration Instructions

N/A.

@os-d os-d requested review from spbrogan, makubacki and apop5 December 11, 2024 18:54
@github-actions github-actions bot added the impact:non-functional Does not have a functional impact label Dec 11, 2024
@os-d os-d added the type:backport Backport changes in a dev branch PR to its release branch. label Dec 11, 2024
Project Mu does not use WHOLEARCHIVE, due to issues in silicon
partner code when it is enabled. In order to support WHOLEARCHIVE,
edk2 added a second dlink step in the build rules to get the
benefit of identifying duplicate symbols without needing the
space expansion. This is an extra linking step for each module
and so does increase build time. Without WHOLEARCHIVE, this is
an unneeded step on Mu, so it is disabled here.
@codecov-commenter
Copy link

codecov-commenter commented Dec 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 1.60%. Comparing base (589b0c3) to head (1f00087).

Additional details and impacted files
@@             Coverage Diff             @@
##           dev/202405    #1243   +/-   ##
===========================================
  Coverage        1.60%    1.60%           
===========================================
  Files            1377     1377           
  Lines          359246   359246           
  Branches         5524     5524           
===========================================
  Hits             5760     5760           
  Misses         353379   353379           
  Partials          107      107           
Flag Coverage Δ
MdeModulePkg 0.67% <ø> (ø)
MdePkg 5.60% <ø> (ø)
NetworkPkg 0.55% <ø> (ø)
PolicyServicePkg 30.41% <ø> (ø)
UefiCpuPkg 4.75% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@apop5 apop5 enabled auto-merge (squash) December 18, 2024 03:25
@apop5 apop5 merged commit 4abc700 into microsoft:dev/202405 Dec 18, 2024
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact:non-functional Does not have a functional impact type:backport Backport changes in a dev branch PR to its release branch.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants