ci(windows-cuda): pass /bigobj to fix C1128 build failure#15
Merged
Conversation
stable-diffusion.cpp's Windows CUDA build fails with: fatal error C1128: number of sections exceeded object file format limit: compile with /bigobj src/stable-diffusion.cpp combined with the CUDA backend's generated code exceeds MSVC's default COFF section limit per object file. The windows-latest-cmake job already works around the same class of issue with -DCMAKE_CXX_FLAGS='/bigobj'; apply the same flag to the CUDA build.
fl0rianr
approved these changes
Jul 2, 2026
fl0rianr
left a comment
There was a problem hiding this comment.
LGTM. This is a focused fix for the MSVC C1128 section-limit failure in the Windows CUDA build, and the affected windows-latest-cuda (sm_89) PR job now passes.
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.
Summary
Fixes the Windows CUDA build failure seen on #14's CI: https://github.com/lemonade-sdk/stable-diffusion.cpp/actions/runs/28593795235/job/84783819045?pr=14
Unrelated to #14's changes (that PR only touches the release job) —
src/stable-diffusion.cppcombined with the CUDA backend's generated code exceeds MSVC's default COFF section limit per object file.Changes
Add
-DCMAKE_CXX_FLAGS=/bigobjto thewindows-latest-cudajob's cmake configure step, matching the same workaround already in place forwindows-latest-cmake.Test plan
windows-latest-cudajob builds successfully on this branch.