Skip to content

Conversation

VivianNK
Copy link
Contributor

@VivianNK VivianNK commented Mar 25, 2025

Description

Update tools def for aarch64 for new 202502 build tools changes.
/WX was added in 202502 as a build flag and now Aarch64 builds
fail. The first failure is because of an undocumented linker warning: 4226 Alignment specified exceeds target machine page size. The second is because the minimum alignment for MSVC ARM64 is 64.

Changes made:

  • Ignore Linker Warning LNK4226. This linker warning has always occurred and can be ignored.
  • Change Aarch64 /ALIGN value from 32 to 64 to fix Linker error #1164 from BaseLib.lib(CpuBreakpoint.obj) : fatal section 0x1 alignment (64) greater than /ALIGN value. 64 is the minimum alignment for MSVC ARM64, which differs from MSVC x64 and was missed when checking into edk2 because ARM64 MSVC CI isn't ran.
  • Impacts functionality?
  • Impacts security?
  • Breaking change?
  • Includes tests?
  • Includes documentation?
  • Backport to release branch?

How This Was Tested

CI and platform build with aarch64

Integration Instructions

N/A
To be upstreamed to edk2

Copy link
Contributor

@os-d os-d left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good to get in basecore once you have decided this is the set of changes needed for booting with this toolchain, but then we should upstream to edk2.

@VivianNK VivianNK changed the title Update tools_def for aarch64 BaseTools: Update tools_def for AARCH64 Mar 25, 2025
@codecov-commenter
Copy link

codecov-commenter commented Mar 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (dev/202502@befa0c1). Learn more about missing BASE report.

Additional details and impacted files
@@              Coverage Diff              @@
##             dev/202502    #1313   +/-   ##
=============================================
  Coverage              ?    1.59%           
=============================================
  Files                 ?     1408           
  Lines                 ?   364700           
  Branches              ?     4570           
=============================================
  Hits                  ?     5799           
  Misses                ?   358828           
  Partials              ?       73           
Flag Coverage Δ
MdeModulePkg 0.64% <ø> (?)
MdePkg 5.54% <ø> (?)
NetworkPkg 0.55% <ø> (?)
PolicyServicePkg 30.42% <ø> (?)
UefiCpuPkg 4.86% <ø> (?)

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@apop5 apop5 marked this pull request as ready for review April 14, 2025 04:17
@VivianNK VivianNK force-pushed the personal/vnowkakeane/aarch64_msvc branch from 094c0ad to bcb6bd9 Compare April 17, 2025 21:00
@VivianNK VivianNK requested a review from makubacki April 18, 2025 22:34
@VivianNK VivianNK requested review from apop5 and os-d April 21, 2025 20:25
/WX was added as a build flag and now aarch64 builds
fail because of an undocumented linker warning: 4226 Alignment specified
exceeds target machine page size.
This linker warning has always occured and can be ignored.

Signed-off-by: Vivian Nowka-Keane <vnowkakeane@linux.microsoft.com>
Alignment needed to be updated to 64 because of a linker warning
when building with MSVC.
/ALIGN:64 is the minimum alignment for MSVC ARM64, which differs from
MSVC x64. This was missed when checking into edk2 because CI isn't
run for MSVC ARM64.

Signed-off-by: Vivian Nowka-Keane <vnowkakeane@linux.microsoft.com>
@VivianNK VivianNK force-pushed the personal/vnowkakeane/aarch64_msvc branch from bcb6bd9 to 1b4a75e Compare April 21, 2025 21:51
@VivianNK VivianNK changed the title BaseTools: Update tools_def for AARCH64 [REBASE & FF] BaseTools: Update tools_def for AARCH64 Apr 21, 2025
@VivianNK VivianNK merged commit ed338da into microsoft:dev/202502 Apr 21, 2025
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants