Skip to content

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

Merged
os-d merged 6 commits into
microsoft:release/202511from
os-d:basetools_fixup
Jun 6, 2026
Merged

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

Conversation

@os-d

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

Copy link
Copy Markdown
Contributor

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.

@mu-automation

mu-automation Bot commented May 29, 2026

Copy link
Copy Markdown
Contributor

❌ QEMU Validation Failed

Source Dependencies

Repository Commit
mu_basecore 5834552
mu_tiano_platforms f584806

Results

Platform Target Build Boot Overall Boot Time Build Logs Boot Logs
Q35 DEBUG ❌ failure ⏩ skipped N/A Build Logs N/A
SBSA DEBUG ✅ success ✅ success 0m 29s Build Logs Boot Logs

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

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

@codecov-commenter

codecov-commenter commented May 29, 2026

Copy link
Copy Markdown

Codecov Report

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

Additional details and impacted files
@@                Coverage Diff                @@
##             release/202511    #1811   +/-   ##
=================================================
  Coverage                  ?    2.25%           
=================================================
  Files                     ?     1636           
  Lines                     ?   420402           
  Branches                  ?     5035           
=================================================
  Hits                      ?     9469           
  Misses                    ?   410851           
  Partials                  ?       82           
Flag Coverage Δ
FmpDevicePkg 9.53% <ø> (?)
MdeModulePkg 1.64% <ø> (?)
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 Harness.
📢 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.

os-d and others added 6 commits June 5, 2026 16:39
…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>
@os-d os-d force-pushed the basetools_fixup branch from be21901 to 5834552 Compare June 5, 2026 23:39
@os-d os-d enabled auto-merge (rebase) June 5, 2026 23:39
@os-d os-d merged commit f265718 into microsoft:release/202511 Jun 6, 2026
101 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