ghc driver should fail loudly when trying to build with -threaded when there's no threaded RTS
The wasm backend doesn't supported threaded RTS yet. So an attempt to build a wasm module with -threaded
will result in a cryptic error message like:
wasm-ld: error: unable to find library -lHSrts-1.0.2_thr
wasm32-wasi-clang: error: linker command failed with exit code 1 (use -v to see invocation)
Before threaded RTS and SMP support is implemented for the wasm backend, the ghc driver should check at link-time whether the target RTS has threaded ways, and if not, bail out with a meaningful error message instead of attempting to carry on with linking. Same with -debug
or other flags that affect which flavour of RTS gets linked into the final product.