[Cherry-Pick] BaseTools: Enable 4k alignment for tool chains#1845
Conversation
Reordering x64 toolchain defines (GCCS) to use a DLINK_XIPFLAGS to set common-page-size to 0x40. Otherwise use default align (0x1000 for x64). Reorder CLANGDWARF toolchain defines to use DLINK_XIPFLAGS to set common-page-size to 0x40 (matching existing behavior) and otherwise use default linker value (0x1000 for x64). Required modifying build_rule.template to support CLANGDWARF build family for SEC, PEI_CORE, PEIM type files. Signed-off-by: Aaron Pop <aaronpop@microsoft.com> (cherry picked from commit 87e486f)
❌ QEMU Validation FailedSource Dependencies
Results
Workflow run: https://github.com/microsoft/mu_basecore/actions/runs/29129582800 This comment was automatically generated by the Mu QEMU PR Validation workflow. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release/202511 #1845 +/- ##
=================================================
Coverage ? 2.25%
=================================================
Files ? 1640
Lines ? 421475
Branches ? 5048
=================================================
Hits ? 9501
Misses ? 411890
Partials ? 84
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
These failures are coming from /FILEALIGN directive also being quite large (4k for ArmVirt, 64 for Q35) https://github.com/microsoft/mu_tiano_platforms/blob/main/Platforms/QemuQ35Pkg/QemuQ35PkgX64.dsc#L60 |
Description
Reordering x64 toolchain defines (GCCS) to use a DLINK_XIPFLAGS to set common-page-size to 0x40. Otherwise use default align (0x1000 for x64).
Reorder CLANGDWARF toolchain defines to use DLINK_XIPFLAGS to set common-page-size to 0x40 (matching existing behavior) and otherwise use default linker value (0x1000 for x64). Required modifying build_rule.template to support CLANGDWARF build family for SEC, PEI_CORE, PEIM type files.
(cherry picked from commit 87e486f)
How This Was Tested
Local builds under linux to verify 4k alignment for x64, and 0x40 alignment for ia32
Integration Instructions
This may increase the size of compiled images.
If platforms choose to opt out of 4k alignment, they can do so with a DLINK override in their platform DSC file.