Thanks for the input. This paragraph is indeed a selling point of Cheerp. "if you build with -flto to enable LTO" is only true if you run on Linux since LLVM LTO support on Windows and Mac is limited.
You can use upstream LLVM (and Emscripten, which uses it) with -flto normally on all platforms. It is basically cross-compiling, so it does not matter at all on what platform you are building, and Windows/Mac/Linux all work the same.
Just to confirm that, here is an Emscripten CI run on MacOS, where you can see among other tests ones that build with lto (search for "lto" in the "run tests" tab):
https://app.circleci.com/pipelines/github/emscripten-core/em...