emscripten-core / emscripten

Emscripten: An LLVM-to-WebAssembly Compiler
Other
25.35k stars 3.25k forks source link

Disable message translation within musl. NFC #22116

Closed sbc100 closed 1 week ago

sbc100 commented 1 week ago

Musl has __lctrans (and the LCTRANS macro form) which it uses to perform translation of messages (such as in strerror and strsignal). These are implemented by looking the message in the current locale data.

However, since emscripten doesn't actually support the loading of locale data from files we never end up translating these messages. This means we can save a little on code size and the transitive dependencies graph of certain functions by simple disabling this translation completely.