Skip to content

[9.1.0] Fix cross-compilation to Windows with clang MinGW (https://github.com…#28832

Draft
iancha1992 wants to merge 2 commits intobazelbuild:release-9.1.0from
iancha1992:cp28752_7
Draft

[9.1.0] Fix cross-compilation to Windows with clang MinGW (https://github.com…#28832
iancha1992 wants to merge 2 commits intobazelbuild:release-9.1.0from
iancha1992:cp28752_7

Conversation

@iancha1992
Copy link
Member

…//pull/28751)

  • Replace selects 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.

Get Bazel to build with clang (not clang-cl) on Windows and non-Windows platforms.

No

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

RELNOTES: None

Closes #28751.

PiperOrigin-RevId: 874799593
Change-Id: Ia836e93d7307a30045c18e052228906c7be9ed92

Description

Motivation

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

Commit 92f4d1a

* 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.

Get Bazel to build with `clang` (not `clang-cl`) on Windows and non-Windows platforms.

No

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

RELNOTES: None

Closes bazelbuild#28751.

PiperOrigin-RevId: 874799593
Change-Id: Ia836e93d7307a30045c18e052228906c7be9ed92
@iancha1992 iancha1992 added team-Rules-CPP Issues for C++ rules awaiting-review PR is awaiting review from an assigned reviewer labels Feb 27, 2026
@iancha1992
Copy link
Member Author

@fmeum Could you please take a look at the error?

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