From 9dc3785a7c7b966943d522da515d59de76d138ec Mon Sep 17 00:00:00 2001 From: Yaraslau Tamashevich Date: Wed, 12 Aug 2026 17:26:49 +0300 Subject: [PATCH] ci: build morph_tests with /bigobj under MSVC to stop recurring C1128 failures Three separate branches independently hit MSVC's C1128 ("number of sections exceeded object file format limit") on test_quantity_forms.cpp under the cl-debug preset, each after adding only a small amount of new schema/rule template instantiation. Rather than chase this file by file as it keeps recurring, /bigobj now applies to the whole morph_tests target: harmless on Release and on other compilers. Co-Authored-By: Claude Sonnet 5 --- tests/CMakeLists.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index fb534c86..d63b2ef8 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -89,6 +89,20 @@ target_link_libraries(morph_tests apply_warnings(morph_tests) +# Several individual test files (schema/rule template instantiation over many +# action/form types, e.g. test_quantity_forms.cpp) have independently pushed +# their .obj's COFF section count past the 32-bit SN_LOFF format's limit +# under MSVC Debug (no /Og folding, full /Zi debug info), aborting with C1128 +# ("number of sections exceeded object file format limit") -- three separate +# unrelated branches hit this on that one file alone, each adding only a +# little more template-instantiation weight. Rather than chase this file by +# file as it recurs, /bigobj is applied to the whole target: harmless on +# Release and on other compilers, and it costs nothing on the files that +# don't need it. +target_compile_options(morph_tests PRIVATE + $<$:/bigobj> +) + # Forwards CMakeLists.txt's project(VERSION ...) into tests/test_version.cpp # so it can static_assert the checked-in include/morph/version.hpp constants # never drift from the build system's declared version.