Why did you (google) deprecate GCC (in android) ?
来源:互联网 发布:seo站外怎么优化 编辑:程序博客网 时间:2024/06/03 21:52
https://github.com/android-ndk/ndk/issues/26
Licensing actually did not play a significant part in the decision. The other reasons that@DoDoENT mentioned are correct though (yes, GCC 5.x supports C++14, but new features definitely do happen more quickly in clang). The biggest reasons for why we made this decision actually haven't been mentioned though:
So, GCC was good to build Android for 10 years and now, suddenly is not, and google must ditch it.
Things change. GCC isn't good for Android any more because GCC doesn't provide the same security features that Clang does (and when it does, it provides them much later).
An incomplete list of why the platform switched to clang:
- We make extensive use of integer overflow sanitizers in shipping code to prevent issues like stagefright from recurring
- Address sanitizer and libfuzzer are used widely in testing
- Clang's better diagnostics catch a ton of bugs that GCC does not
- Control flow integrity and safe stacks are being deployed (are deployed?) for even more exploit mitigation.
The fact is that we have significant reason to invest in clang, and splitting effort across maintaining two compilers makes both of them worse.
As it stands now, both compilers are fairly comparable in terms of performance and code size.#21 points at code size increases for armeabi-v7a. That is not always the case, and for every other architecture we actually see smaller code. From some analysis I did when we made this decision for the platform:
It seems our 32-bit ARM devices are typically 1MB larger (out of 600MB-900MB total), whereas volantis is slightly smaller, and fugu is 15MB smaller. Strangely, sprout_b is also slightly smaller.
I think the ARM32 numbers are small enough to not bother anyone, especially given that it looks like it will be a win for the new devices since they're aarch64.
All the comparisons we did showed that Clang and GCC were pretty much equivalent quality when it came to the code they produced. Yes, sometimes we find cases where GCC is faster, but we also find cases where Clang is faster. As an example, we saw a20% performance improvement in the ART interpreter when we switched to clang.
- Why did you (google) deprecate GCC (in android) ?
- why you crashed in objc_msgSend()
- Why You Can’t Work For Google
- DID YOU ?
- What did Google change in the kernel?
- What did Google change in the kernel?
- How did Google manage to do this? Slide ActionBar in Android application
- Android Notification的setLatestEventInfo()@deprecate
- why do you need ./ to execute programs in current directory?
- what you like most in the city,why?
- WHY YOU SHOULDN'T MERGE JAVASCRIPT IN MAGENTO
- Why you should embrace functional programming in Java 8
- Why did we implement Swing in this way?(为什么Swing要这样实现呢?)
- Did You Know?
- Did you know?
- Did you know
- Did you know ?
- Did you Know!
- java Map
- 设计模式之策略设计模式
- JavaScript实现表单的分向提交
- 外星日历
- 一个新消息类创建的例子
- Why did you (google) deprecate GCC (in android) ?
- 微信小程序:能否上传多张图片
- cmd或eclipse的控制台输出日志logger乱码问题记录
- openstack创建虚拟机keystone流程中文图
- 不定与慌张
- 风投与中国
- 初入CSDN,请多指教!嵌入式宕机酱参上!=v=
- typescript学习笔记(二)
- 【Ubuntu】Ubuntu16.04安装jdk以及环境变量配置