From 68e66eefb44befe6d75b77e5fbf15195a0be626d Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Mon, 9 Jun 2025 14:17:35 +0200 Subject: [PATCH] Workaround file-too-big error on MinGW CI --- .github/workflows/ci.yml | 3 +++ test/Jamfile.jam | 18 +++++++++++++----- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 06769cd..818356f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -197,6 +197,9 @@ jobs: if [[ -n "${{matrix.generator}}" ]]; then extra_args+=(-G "${{matrix.generator}}") fi + if [[ "${{matrix.generator}}" == "MinGW"* ]]; then + extra_args+=(-DCMAKE_CXX_FLAGS="-Wa,-mbig-obj") + fi echo "Using extra args: ${extra_args[*]}" cmake .. -DCMAKE_BUILD_TYPE=Debug -DBoost_ROOT="$BOOST_ROOT/stage" -DCMAKE_CXX_STANDARD="${CXX_STANDARD##*,}" "${extra_args[@]}" -DCMAKE_VERBOSE_MAKEFILE=ON -DBoost_DEBUG=ON -DBoost_VERBOSE=ON cmake --build . --config Debug --parallel 3 diff --git a/test/Jamfile.jam b/test/Jamfile.jam index 4cbca98..31a4292 100644 --- a/test/Jamfile.jam +++ b/test/Jamfile.jam @@ -19,16 +19,24 @@ path-constant parent : .. ; run /boost/tools/inspect//inspect/release : $(parent) -text -brief : : always_show_run_output : inspect ; explicit inspect ; -rule run-test ( name ) +rule run-test ( name : options * ) { - run $(name) defined_1.cpp defined_2.cpp undefined.cpp /boost//unit_test_framework : : : : $(name)_ ; - run $(name) undefined.cpp /boost//unit_test_framework : : : MOCK_USE_CONVERSIONS : $(name)_use_conversions ; - run $(name) undefined.cpp /boost//unit_test_framework /boost//thread : : : MOCK_THREAD_SAFE BOOST_THREAD_USES_MOVE multi : $(name)_thread_safe ; + run $(name) defined_1.cpp defined_2.cpp undefined.cpp /boost//unit_test_framework : : : $(options) : $(name)_ ; + run $(name) undefined.cpp /boost//unit_test_framework : : : $(options) MOCK_USE_CONVERSIONS : $(name)_use_conversions ; + run $(name) undefined.cpp /boost//unit_test_framework /boost//thread : : : $(options) MOCK_THREAD_SAFE BOOST_THREAD_USES_MOVE multi : $(name)_thread_safe ; } rule run-tests { - for name in [ glob test_*.cpp detail/test_*.cpp ] { run-test $(name) ; } + for name in [ glob test_*.cpp ] { run-test $(name) ; } + # Avoid object file getting to big on MinGW + run-test detail/test_function.cpp : + gcc,windows:on + gcc,windows:space ; + run-test detail/test_invocation.cpp ; + run-test detail/test_is_functor.cpp ; + run-test detail/test_signature.cpp ; + run-test detail/test_type_name.cpp ; } alias mock_tests : [ run-tests ] ;