https://v8.dev/blog/emscripten-llvm-wasm
The jist of it is:
emsdk install latest-upstream
emsdk activate latest-upstream
According to the linked blog, there are code size benefits as well as link time speed-ups.
The faster link time mostly affects application builds.
Of course, you will need to recompile Qt for WebAssembly to use this, and need to configure it with the Qt WebAssembly specific option:
-device-option WASM_OBJECT_FILES=1
After that, you just need to run qmake as normal.
One note: You will need to remove the line
-s \"BINARYEN_TRAP_MODE=\'clamp\'\"
from the mkspecs/wasm-emscripten/qmake.conf, as upstream llvm webassembly backend does it's own overflow clamping and does not support BINARYEN_TRAP_MODE argument.