Conversation
Main broke because two independently-green PRs landed without either branch containing the other: #10637 (fix/windows-abi-targets) added four MinGW variants to RocTarget, and #10904 (fix/windows-shim-duplicate-compiler-rt) added DefaultPlatformCompilerRtObjects.forTarget, an exhaustive switch over RocTarget. The two touch different files, so git merged them cleanly and Zig then rejected the switch: src/cli/main.zig:704:16: error: switch must handle all possibilities src/target/mod.zig:381:5: note: unhandled enumeration value: 'x64mingw' Route the MinGW targets to the `null` arm alongside the MSVC Windows targets. `null` is correct rather than a placeholder object: no roc_default_compiler_rt.o is shipped under src/cli/targets/x64mingw or arm64mingw (only the glibc and musl targets carry one), and the caller turns `null` into rejectRunTargetNotExecutable, which is already how x64win and arm64win behave. The v1 variants are unreachable here since defaultCpuTarget() folds x64v1mingw into x64mingw, but the switch is over the unnormalized enum so they still have to be listed, matching the surrounding arms. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011571s4BMwoV9qAgcx4JyP9
Contributor
Greptile SummaryThis PR restores the exhaustive default-platform compiler-rt target switch after MinGW targets were added.
Confidence Score: 5/5The PR appears safe to merge because it completes the exhaustive target switch and preserves the existing MinGW build path. MinGW compiler-rt objects are not generated, MinGW run requests are rejected before this lookup, and MinGW artifact builds use a separate object-selection path.
|
| Filename | Overview |
|---|---|
| src/cli/main.zig | Adds all four MinGW enum variants to the compiler-rt switch's null arm, resolving the build failure without changing supported MinGW artifact construction. |
Reviews (1): Last reviewed commit: "Handle MinGW targets in the default plat..." | Re-trigger Greptile
Collaborator
Author
|
Superseded by #10918 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Main broke because two independently-green PRs landed without either branch containing the other:
#10637 (fix/windows-abi-targets) added four MinGW variants to
RocTarget, and #10904 (fix/windows-shim-duplicate-compiler-rt) added
DefaultPlatformCompilerRtObjects.forTarget, an exhaustive switch over
RocTarget. The two touch different files, so git merged them cleanly
and Zig then rejected the switch:
Route the MinGW targets to the
nullarm alongside the MSVC Windows targets.nullis correct rather than a placeholder object: no roc_default_compiler_rt.o is shipped under src/cli/targets/x64mingw or arm64mingw (only the glibc and musl targets carry one), and the caller turnsnullinto rejectRunTargetNotExecutable, which is already how x64win and arm64win behave.The v1 variants are unreachable here since defaultCpuTarget() folds x64v1mingw into x64mingw, but the switch is over the unnormalized enum so they still have to be listed, matching the surrounding arms.