[pugixml] Disable functionality we don't need.

This reduces the size of pugixml.dll to within range of what
tinyxml-10.dll was in previous versions.

Size comparisons: (amd64 release build, with LTO, MSVC 2022 17.6.5)

tinyxml-10.dll in rom-properties 2.4.1: 105,472

pugixml.dll:
- With all enabled:     222,208
- Disable XPATH:        142,336
- + disable STL:        121,856
- + disable exceptions: 121,856

NOTE: Disabling exceptions doesn't seem to change the code size at all,
even if STL is left enabled.
This commit is contained in:
David Korth 2025-04-20 11:13:35 -04:00
parent 328c0047c8
commit 3022868577

View File

@ -269,10 +269,10 @@ IF(USE_INTERNAL_XML)
SET(PUGIXML_COMPACT OFF)
SET(PUGIXML_INSTALL ON)
# TODO: Investigate these.
SET(PUGIXML_NO_XPATH OFF)
SET(PUGIXML_NO_STL OFF)
SET(PUGIXML_NO_EXCEPTIONS OFF)
# Disable functionality we don't need.
SET(PUGIXML_NO_XPATH ON)
SET(PUGIXML_NO_STL ON)
SET(PUGIXML_NO_EXCEPTIONS ON)
# Build PugiXML.
ADD_SUBDIRECTORY(pugixml)