Skip to content

Fix //src/main/cpp:client link with MinGW#28771

Draft
fmeum wants to merge 2 commits intobazelbuild:masterfrom
fmeum:fix-mingw-2
Draft

Fix //src/main/cpp:client link with MinGW#28771
fmeum wants to merge 2 commits intobazelbuild:masterfrom
fmeum:fix-mingw-2

Conversation

@fmeum
Copy link
Collaborator

@fmeum fmeum commented Feb 24, 2026

Description

Linking the Bazel client requires a number of explicit library linker args when using MinGW. This was missed in #28751.

Motivation

With this PR, Bazel can in principle be cross-compiled to Windows from Unix (except for the manifest patching in the minimize_jdk script, which currently only runs on a Windows executor).

Build API Changes

No

Checklist

  • I have added tests for the new use cases (if any).
  • I have updated the documentation (if applicable).

Release Notes

RELNOTES: None

* Replace `select`s on flags for Windows with the appropriate compiler constraints. Also update `blake3`, which contains the same type of fix in its most recent version.
* Ditch the `cmd.exe` implementation of `merge_licenses` that incorrectly matched on the target rather than the exec platform. Bash is already a requirement for Bazel at this point, so we might as well use it.
* Drop the explicit C++17 standard flags since this is already the default standard in Bazel@HEAD.
@fmeum fmeum changed the title Fix //src/main/cpp:client link with MinGW Fix //src/main/cpp:client link with MinGW Feb 24, 2026
@fmeum
Copy link
Collaborator Author

fmeum commented Feb 24, 2026

Stacked on #28751

@fmeum fmeum requested a review from meteorcloudy February 24, 2026 10:10
@fmeum fmeum marked this pull request as ready for review February 24, 2026 10:10
@github-actions github-actions bot added team-Rules-CPP Issues for C++ rules awaiting-review PR is awaiting review from an assigned reviewer labels Feb 24, 2026
@fmeum
Copy link
Collaborator Author

fmeum commented Feb 24, 2026

@bazel-io fork 9.1.0

@meteorcloudy
Copy link
Member

Please ping me when this is ready for import

@fmeum fmeum marked this pull request as draft February 24, 2026 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-review PR is awaiting review from an assigned reviewer team-Rules-CPP Issues for C++ rules

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants