123

用 Clang 构建内核

 6 years ago
source link: http://www.solidot.org/story?sid=54012
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

用 Clang 构建内核

pigsrollaroundinthem (39396)发表于 2017年09月29日 07时32分 星期五 新浪微博分享 豆瓣分享 来自谷歌之心昭然若揭

在 Linux Plumbers Conference 会议上,Google 的内核开发者 Greg Kroah-Hartman 和 Nick Desaulniers 介绍了用 Clang 构建内核的进展。Desaulniers 称今天的 Android 用户空间都用 Clang 构建,Google 想要减少它需要支持的工具链数量,至少在目前用 Clang 构建内核主要对 Google 有利,但有理由相信这对更广泛的社区同样有利。Clang 提供了一组与 GCC 不同的警告,更少的 bug 显然对所有内核用户都有利。Clang 还能提供额外的工具,如控制流分析,link-time optimization, profile-guided optimization。用不同的编译器构建代码也有助于筛选出依赖于未定义行为的代码。Greg Kroah-Hartman 称竞争对每个人都有利,过去五年 GCC 引入的新特性都是与 LLVM/Clang 竞争的结果。他希望 Linux 内核也有竞争对手。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK