diff --git a/example/crc32/crc32.cc b/example/crc32/crc32.cc index e1dc82ce..eb554a03 100644 --- a/example/crc32/crc32.cc +++ b/example/crc32/crc32.cc @@ -52,6 +52,17 @@ for a C++ compiler $CXX, such as clang++ or g++. // https://raw.githubusercontent.com/nothings/stb/master/docs/stb_howto.txt #define WUFFS_CONFIG__STATIC_FUNCTIONS +// Defining the WUFFS_CONFIG__MODULE* macros are optional, but it lets users of +// release/c/etc.c choose which parts of Wuffs to build. That file contains the +// entire Wuffs standard library, implementing a variety of codecs and file +// formats. Without this macro definition, an optimizing compiler or linker may +// very well discard Wuffs code for unused codecs, but listing the Wuffs +// modules we use makes that process explicit. Preprocessing means that such +// code simply isn't compiled. +#define WUFFS_CONFIG__MODULES +#define WUFFS_CONFIG__MODULE__BASE +#define WUFFS_CONFIG__MODULE__CRC32 + // If building this program in an environment that doesn't easily accommodate // relative includes, you can use the script/inline-c-relative-includes.go // program to generate a stand-alone C++ file.