Closed antaalt closed 2 weeks ago
I will look into the changes requested, in the meantime, I think it should be better to use WASI sysroot and not rely on WASI SDK so that we can use standard clang and not wasi SDK bundled clang, I will try to look into this aswell
not declaring some unsupported features such as no-exceptions (WASI does not support exceptions)
FWIW, I don't think it's libc's job to automatically pass a flag like -fno-exceptions
, if that's what you mean.
You mean the flag should still be user provided ? As exceptions are not supported on the target and WASI only support clang as a compiler right now, I think it does make sense to provide it
It seems that currently cc-rs cannot build c++ to WASI correctly, it is using clang instead of clang++, not declaring some unsupported features such as no-exceptions (WASI does not support exceptions), and not linking libc++ aswell that is coming from WASI SDK. With this PR, I am hoping this could fix this and avoid some extra code such as .compiler("clang++") to fix it