This saves roughly half a megabyte in binary size, in the non-GUI binaries:
| Binary | master (MB) | PR (MB) |
|---|---|---|
| bitcoin | 2.15 | 1.67 |
| bitcoin-cli | 8.20 | 7.72 |
| bitcoin-qt | 43.87 | 43.87 |
| bitcoin-tx | 4.93 | 4.45 |
| bitcoin-util | 4.52 | 4.04 |
| bitcoin-wallet | 9.26 | 8.77 |
| bitcoind | 17.75 | 17.27 |
The first commit is pulled out of #25573.
See https://gcc.gnu.org/onlinedocs/libstdc++/manual/configure.html:
--enable-wchar_t[default]Template specializations for the wchar_t type are required for wide character conversion support. Disabling wide character specializations may be expedient for initial porting efforts, but builds only a subset of what is required by ISO, and is not recommended. By default, this option is on. This option can change the library ABI.