3 ms·
As sibling mentioned, you can build the kernel with clang today. `make CC=clang`, and for whatever reason I've found that it produces code that's significantly
by e63f67dd-065b 2y ago
As sibling mentioned, you can build the kernel with clang today. `make CC=clang`, and for whatever reason I've found that it produces code that's significantly more pleasant to step through under a debugger than gcc.
If anybody has an explanation for this I'd love to hear it.
- MaskRay 2y agoInteresting. Traditionally, Clang's -O1 and higher optimizations have been considered less debuggable than GCC's. Sony developers have proposed changes to improve the debugging experience and some work has been done, e.g. https://discourse.llvm.org/t/rfc-redefine-og-o1-and-add-a-new-level-of-og/72850 https://discourse.llvm.org/t/rfc-redefine-og-o1-and-add-a-ne... * change representation to help make -g not change codegen : https://discourse.llvm.org/t/rfc-debuginfo-proposed-changes-to-the-textual-ir-representation-for-debug-values/73491 https://discourse.llvm.org/t/rfc-debuginfo-proposed-changes-...