Skip to content

[build] Replace Step_InstallGNUBinutils with MSBuild targets#11332

Draft
jonathanpeppers wants to merge 2 commits into
mainfrom
dev/peppers/xaprepare-binutils
Draft

[build] Replace Step_InstallGNUBinutils with MSBuild targets#11332
jonathanpeppers wants to merge 2 commits into
mainfrom
dev/peppers/xaprepare-binutils

Conversation

@jonathanpeppers
Copy link
Copy Markdown
Member

Migrate the binutils installation from xaprepare to a standard MSBuild Microsoft.Build.NoTargets project (src/binutils), as part of the ongoing migration away from xaprepare.

The new project downloads the toolchain archive, extracts it with 7-zip, and copies binutils to the install directories for both the host OS and Windows (including PDB symbol archiving).

@jonathanpeppers
Copy link
Copy Markdown
Member Author

/review

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 12, 2026

Android PR Reviewer completed successfully!

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

✅ LGTM — Clean migration from xaprepare to MSBuild targets

Summary: This PR replaces the C# Step_InstallGNUBinutils xaprepare step with a standard Microsoft.Build.NoTargets MSBuild project (src/binutils), following the established pattern used by src/aapt2 and src/bundletool. The migration is well-executed.

What's good:

  • ✅ SHA256 hash verification on the downloaded archive — an improvement over the old code which had none
  • ✅ Proper Inputs/Outputs on download and extract targets for incremental builds
  • SkipUnchangedFiles on Copy tasks minimizes redundant I/O
  • ✅ Correct handling of host vs Windows binutils install directories, matching old behavior
  • ✅ PDB+EXE symbol archiving logic is simplified with wildcard globs while preserving correctness
  • ✅ Clean removal of 5 old Step_InstallGNUBinutils files and the scenario registration

Issue counts: 0 ❌ | 1 ⚠️ | 2 💡

⚠️ One concern: The binutils version/URL/path configuration in Configurables.cs is now dead code (neither Step_InstallGNUBinutils nor Step_Get_Windows_Binutils is used), creating a dual source of truth with the new XABinutilsVersion/XABinutilsHash in Configuration.props. Worth cleaning up to prevent version drift.

CI status: All checks passing (dotnet-android ✅, license/cla ✅).

Generated by Android PR Reviewer for issue #11332 · ● 7.8M

Comment thread Configuration.props
Comment thread src/binutils/binutils.targets Outdated
Comment thread src/binutils/binutils.targets
jonathanpeppers and others added 2 commits May 13, 2026 09:12
Migrate the binutils installation from xaprepare to a standard
MSBuild `Microsoft.Build.NoTargets` project (`src/binutils`),
as part of the ongoing migration away from xaprepare.

The new project downloads the toolchain archive, extracts it with
7-zip, and copies binutils to the install directories for both the
host OS and Windows (including PDB symbol archiving).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove stale binutils entries from Configurables.cs (BinutilsVersion,
BinutilsArchive, WindowsBinutilsInstallDir, HostBinutilsInstallDir,
BinutilsCacheDir) and delete the unused Step_Get_Windows_Binutils.cs.

Fix MSBuild property function spacing to match repo conventions:
ToLowerInvariant() without a space before the parentheses.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jonathanpeppers jonathanpeppers force-pushed the dev/peppers/xaprepare-binutils branch from ad97e61 to 71b5134 Compare May 13, 2026 14:13
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.

1 participant