The prior method was to generate one line of
`g_container.emplace_back(…)` per entry in the list & letting the
compiler chew on that. Each string argument in that call was done was
`u8"Some Name"s`, meaning as a std::string instance.
Drawbacks:
• takes the compiler ages to compile, even forcing me to drop all
optimizations for the ISO-639 language list file
• even smaller files such as the IANA language subtag registry lists
take more than 30s to compile
• due to no optimizations initialization is actually not as fast as
could be
The new method uses a plain C-style array of structs with `char
const *` entries for the initial list. The initialization method then
copies the entries from that list to the actual container, again using
`std::emplace_back(…)`.
This yields sub-1s compilation times even with the longest file, the
ISO-639 language list, and the runtime initialization is actually
faster.
Several files have OS-specific names like "…/windows.cpp", and they
should only be compiled when currently compiling for that OS. The
three main OS mentioned in the build system are Linux, macOS and
Windows. Other Unices like FreeBSD aren't mentioned explicitly and
should be treated the same as Linux (as the code in those
Linux-specific files is rather Unix-but-not-macOS-specific).
Fixes#3316.