Skip to content

ci(windows-cuda): pass /bigobj to fix C1128 build failure#15

Merged
kenvandine merged 1 commit into
lemonadefrom
fix/windows-cuda-bigobj
Jul 2, 2026
Merged

ci(windows-cuda): pass /bigobj to fix C1128 build failure#15
kenvandine merged 1 commit into
lemonadefrom
fix/windows-cuda-bigobj

Conversation

@kenvandine

Copy link
Copy Markdown
Member

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

D:\a\stable-diffusion.cpp\stable-diffusion.cpp\src\stable-diffusion.cpp : fatal error C1128: number of sections exceeded object file format limit: compile with /bigobj

Unrelated to #14's changes (that PR only touches the release job) — src/stable-diffusion.cpp combined with the CUDA backend's generated code exceeds MSVC's default COFF section limit per object file.

Changes

Add -DCMAKE_CXX_FLAGS=/bigobj to the windows-latest-cuda job's cmake configure step, matching the same workaround already in place for windows-latest-cmake.

Test plan

  • Validated YAML parses.
  • Confirm the windows-latest-cuda job builds successfully on this branch.

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 fl0rianr left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

@kenvandine
kenvandine merged commit 1206d2d into lemonade Jul 2, 2026
12 checks passed
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.

2 participants