3 ms·
Is there anything in the Linux kernel that can't be compiled with clang? There is plenty of experience with building BSD variants using it.
by rjsw 4y ago
Is there anything in the Linux kernel that can't be compiled with clang? There is plenty of experience with building BSD variants using it.
- steveklabnik 4y agoHistorically, the answer to that was "yeah totally." But folks have put a lot of work into getting clang to build the kernel, and IIRC Google has been building their Android kernels with clang for a few years now. ~~It's not~~ (see below) It wasn't supported directly by upstream, and in fact historically was pretty much the opposite: the intention was to not care about portability between compilers at all.
- jyxent 4y agoI think it is fully supported now: https://docs.kernel.org/kbuild/llvm.html https://docs.kernel.org/kbuild/llvm.html
- steveklabnik 4y agoThank you! That's more than I knew of. (I do think that what "support" means is kind of amusing, I would also say that this counts as support, but above you have people arguing that only Rust's Tier 1 support is called "support"...)
- ncmncm 4y agoIt's one thing to say developers have to add a new compiler front end for some drivers if they want to compile them; and, that some developers will just have to add it regardless. It is wholly another to say that they need adopt a whole different code-generation regime. It adds risk, and adds to what they need to understand to know what they are building. A pro needs to understand where problems come from, and be equipped to dig down to them. So, OK for hobbyists, but a burden for pros. It is the difference between "neat project, might succeed" and "mature". Rust stands a good chance of becoming mature in a few years, more than can be said about almost everything else.