Files
openmw/.github/workflows
AnyOldName3 2562354ddc Make releases not three times the size of dev builds
Dev builds are RelWithDebInfo so we get slightly more intelligible stack traces.

Release builds are Release so we get better performance.
However, Release builds have no debug symbols by default, so we add the /DEBUG flag to CMAKE_EXE_LINKER_FLAGS_RELEASE to opt in.
We hadn't noticed that this switches the default value for some options, and that therefore we weren't just getting debug symbols.

/OPT:REF strips unused functions, typically ones that are inlined at all call sites.
Templatey code typically has lots of functions like that.
Not having this made the binary huge.

/OPT:ICF is Identical COMDAT Folding, i.e. deduplicating functions with identical machine code.
Not having this means extra instruction cache pressure, as simple things like getters typically end up being identical to something else, so there's a performance impact.
Also, duplicated stuff obviously makes the binary bigger.

On my machine, an MSBuild build is explicitly setting these for the Release configuration, even though I can't find anything in CMake, our CMake scripts, the generated .vcxproj files, or the merged vcxproj from msbuild /pp that does that.
This means that the 0.48 release and earlier weren't affected, as 0.49 was the first one build via Ninja.
2026-03-17 18:27:07 +00:00
..