Repository navigation
eolib v0.1.0-beta.6
Pre-release
Pre-release
·
2 commits
to master
since this release
Added
EOLIB_ENUM_STRINGSCMake option (defaultON). When it's off, the enumToString(value)functions andoperator<<overloads aren't compiled, which makes static executables smaller. The generated code guards them withEOLIB_NO_ENUM_STRINGS, which theeolibtarget exports to consumers, and the generatedToString()methods of structs and packets print enum fields as numbers instead.EOLIB_STRUCT_STRINGSCMake option (defaultON). When it's off,Serializable::ToString(), the generatedToString()methods of structs and packets, andoperator<<forSerializablearen't compiled. The generated code guards them withEOLIB_NO_STRUCT_STRINGS, which theeolibtarget exports to consumers.ToString()is virtual, so this is the larger of the two savings: the vtables otherwise keep everyToString()in the executable, even with--gc-sections.
Changed
- On GCC and Clang, the library is compiled with
-ffunction-sections -fdata-sections, so static consumers that link with-Wl,--gc-sectionsonly keep the functions they use. EoReaderno longer usesstd::make_shared, which links extra libstdc++ objects into static builds compiled with-fno-rtti.