Skip to content

eolib v0.1.0-beta.6

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 19 Oct 02:07
· 2 commits to master since this release

Added

  • EOLIB_ENUM_STRINGS CMake option (default ON). When it's off, the enum ToString(value) functions and operator<< overloads aren't compiled, which makes static executables smaller. The generated code guards them with EOLIB_NO_ENUM_STRINGS, which the eolib target exports to consumers, and the generated ToString() methods of structs and packets print enum fields as numbers instead.
  • EOLIB_STRUCT_STRINGS CMake option (default ON). When it's off, Serializable::ToString(), the generated ToString() methods of structs and packets, and operator<< for Serializable aren't compiled. The generated code guards them with EOLIB_NO_STRUCT_STRINGS, which the eolib target exports to consumers. ToString() is virtual, so this is the larger of the two savings: the vtables otherwise keep every ToString() 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-sections only keep the functions they use.
  • EoReader no longer uses std::make_shared, which links extra libstdc++ objects into static builds compiled with -fno-rtti.