[dead]
Re:Cheerp 3.0: The most advanced C++ compiler for the Web no...
by azakai on Tuesday March 14, 2023 @02:01PM
(#35155697)
That is not true for compiling to wasm.
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...
Re:Cheerp 3.0: The most advanced C++ compiler for the Web no...
by smeenai on Tuesday March 14, 2023 @02:18PM
(#35156072)
Limited in what way? LLVM LTO works seamlessly if you use LLD on both macOS and Windows; that's what Chrome does, for example. LLVM LTO also works pretty seamlessly with ld64 on macOS; the linker needs libLTO, but the driver takes care of that for you.