Skip to content

[REBASE & FF] Cherry-Pick Recent BaseTools Changes and Untangle GenStm Interaction#1811

Open
os-d wants to merge 6 commits into
microsoft:release/202511from
os-d:basetools_fixup
Open

[REBASE & FF] Cherry-Pick Recent BaseTools Changes and Untangle GenStm Interaction#1811
os-d wants to merge 6 commits into
microsoft:release/202511from
os-d:basetools_fixup

Conversation

@os-d
Copy link
Copy Markdown
Contributor

@os-d os-d commented May 29, 2026

Description

This series of commits attempts to untangle some mu_changes in BaseTools for GenStm with the upstream in order to pull down the change to clean BaseTools before building them. This could have been deferred to the next integration, but folks have wanted the basetools clean and this work had to be done at some point; likely would have been forgotten at the next integration, so I did it now. It can certainly be deferred.

This PR does the following:

  • Revert a commit centralizing a STATIC_ASSERT definition in BaseTools for use by GenStm - should be merged into original GenStm commit
  • Revert a commit adding CPU_INFORMATION_HEADER to GenStm - should be merged into the original GenStm commit
  • Revert the original GenStm commit - this did a partial BaseTools clean that can be removed now we are doing a full clean
  • Cherry-pick clang build support for BaseTools. This makes a cleaner diff for the next cherry-pick.
  • Cherry-pick BaseTools clean
  • Cherry-pick original GenStm commit, dropping redundant BaseTools partial clean
  • Squash the CPU_INFORMATION_HEADER and STATIC_ASSERT commits into the original GenStm commit. No reason to carry those separately and they complicate the story of maintaining an override for GenStm.

The final situation is only Edk2ToolsBuild.py is changed.

  • Impacts functionality?
  • Impacts security?
  • Breaking change?
  • Includes tests?
  • Includes documentation?

How This Was Tested

BaseTools build. A GenStm test would be appreciated.

Integration Instructions

N/A.

os-d and others added 6 commits May 29, 2026 07:44
…sage"

This temporarily reverts commit 9601f61
to better fix up history.
This reverts commit 35f2ed5
temporarily as part of it has been upstreamed to edk2.
Update Edk2ToolsBuild.py to support using Linux/CLANG and
Windows Mingw/CLANG environments to build C tools within
the BaseTools directory. The environment variable settings
CC=clang and CXX=clang++ must also be set before running
Edk2ToolsBuild.py to enable the use of the clang compiler.
PATH must also be set to include the path to the installed
version of clang and clang++ to use. If CC and CXX are not
set, the the default compiler is used.

When Mingw CLANG environment is being used, CLANG_BIN must
be set to the path to the CLANG tools so the mingw-make.exe
utility can be used to process BaseTools makefiles.

Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
(cherry picked from commit 85e2fef)
… on Windows

Currently, Edk2BaseToolsBuild.py cleans before doing the build
on Linux, but doesn't do so on Windows.

It has been observed on Windows that the incremental build can
lead to a bad state of some logic from the old build and some from
the new build.

This commit aligns Windows to Linux and always do a clean before
building on both OSes.

Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
(cherry picked from commit b313503a60e987f0c2c131abe588a5d06e33f8c5)
Adds GenStm as a C tool.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
@mu-automation
Copy link
Copy Markdown
Contributor

mu-automation Bot commented May 29, 2026

✅ QEMU Validation Passed

Source Dependencies

Repository Commit
mu_basecore be21901
mu_tiano_platforms de8be29

Results

Platform Target Build Boot Overall Boot Time Build Logs Boot Logs
Q35 DEBUG ✅ success ✅ success 0m 15s Build Logs Boot Logs
SBSA DEBUG ✅ success ✅ success 0m 33s Build Logs Boot Logs

Workflow run: https://github.com/microsoft/mu_basecore/actions/runs/26645513206

This comment was automatically generated by the Mu QEMU PR Validation workflow.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (release/202511@0749d6b). Learn more about missing BASE report.

Additional details and impacted files
@@                Coverage Diff                @@
##             release/202511    #1811   +/-   ##
=================================================
  Coverage                  ?    2.21%           
=================================================
  Files                     ?     1634           
  Lines                     ?   420137           
  Branches                  ?     4949           
=================================================
  Hits                      ?     9308           
  Misses                    ?   410754           
  Partials                  ?       75           
Flag Coverage Δ
FmpDevicePkg 9.53% <ø> (?)
MdeModulePkg 1.58% <ø> (?)
MdePkg 5.44% <ø> (?)
NetworkPkg 0.55% <ø> (?)
PolicyServicePkg 30.42% <ø> (?)
SecurityPkg 1.59% <ø> (?)
UefiCpuPkg 4.78% <ø> (?)
UnitTestFrameworkPkg 11.70% <ø> (?)

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.

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