Add some CMake guards when building the sysroot#462
Conversation
alexcrichton
commented
Jul 26, 2024
- Require that the compiler is Clang, for example gcc and msvc cannot compile to WebAssembly.
- Require that the Clang version is above the minimum threshold. Unsure what the minimum threshold is at this time so I've set it to 18.0.0
* Require that the compiler is Clang, for example gcc and msvc cannot compile to WebAssembly. * Require that the Clang version is above the minimum threshold. Unsure what the minimum threshold is at this time so I've set it to 18.0.0
abrown
left a comment
There was a problem hiding this comment.
Why set the minimum? I.e., if it's too high then old-toolchain users run into issues; if it's too low then what's the point?
|
It's mostly the first part, "users run into issues," where an error message saying "your toolchain is too old" is often more debuggable than some obscure "whatever error this old compiler happened to emit" error message. In my experience in Rust most folks outside of maintainers don't know how to diagnose such errors since the version isn't the obvious culprit |
abrown
left a comment
There was a problem hiding this comment.
Makes sense; let's merge it. I would propose we also keep open the possibility of lowering the minimum in the future: if any users of older toolchains feel strongly about this, maybe we allow them to downgrade this?