由买买提看人间百态

topics

全部话题 - 话题: clang
1 2 3 4 下页 末页 (共4页)
a****a
发帖数: 5763
1
http://bbs.weiphone.com/read.php?tid=506463
Mac OS X 10.6即所谓的Snow Leopard操作系统已正式发售。一如既往,Apple产
品光鲜的外表下凝聚了太多艰辛的劳作。ArsTechnic的John Siracusa以其独特的、专
业的、全面的视角深入翔实地体验这款最新的操作系统。
Weiphone.com将对该综述进行翻译整理并独家连载。欢迎关注。

引用
译注:为了帮助您更加顺畅地理解本文的内容,这里补充了文中一些相关概念的背景资
料。
编译器(compiler):是一种能够将源代码(通常由高级别的程序语言编写而成)
转换为低级别机器语言的程序。源码转换最重要的一个目的在于创建可执行文件。详情
请参考wikipedia。
LLVM(Low Level Virtual Machine,低级虚拟机):是构架编译器(compiler)
的框架系统,以C++编写而成,用于优化以任意程序语言编写的程序的编译时间(
compile-time)、链接时间(link... 阅读全帖
g****y
发帖数: 436
2
来自主题: Programming版 - Mavericks 9.2 and clang 5.1
Hi, I recently updated from 9.1 to 9.2 and consequently installed the latest
Xcode that bundles with clang 5.1, which is now notorious for its "feature"
in calling warnings as errors.
So I manually delete it:
sudo rm -r /Library/Developer/CommandLineTools/usr/
xcrun
xcrun: error: invalid active developer path (/Library/Developer/
CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr
/bin/xcrun
Then I install Command Line tools for Mavericks 9.1 which bundles with clang
5.0... 阅读全帖
a***y
发帖数: 19743
3
来自主题: Apple版 - Clang编译器。。。
http://clang.llvm.org/
http://en.wikipedia.org/wiki/Clang
是Apple sponsored开源项目,目标是提供GCC替代品。
最新版本的Quicksilver用这个编译的,据说会快一点。。。
Starting in 2005, Apple have made extensive use of LLVM in a number of
commercial systems,[4] including the iPhone development kit and Xcode 3.1.
One of the most visible uses to date has been an OpenGL code compiler for
Mac OS X that converts OpenGL calls into more fundamental calls for graphics
processing units that do not support certain features. This allowed Apple
to s
G*****7
发帖数: 1759
4
are u able to compile qt 5 beta or 4.8.2 with the clang compiler from xcode
4.4.1?
c***r
发帖数: 4631
5
http://libcxx.llvm.org/
libc++ is a 100% complete C++11 implementation on Apple's OS X.
LLVM and Clang can self host in C++ and C++11 mode with libc++ on Linux.
Ports to other platforms are underway.
a****a
发帖数: 5763
6
2011年12月3日,LLVM 3.0正式版发布,完整支持所有ISO C++标准和大部分C++ 0x的新
特性, 这对于一个短短几年的全新项目来说非常不易。
开发者的惊愕
在2011年WWDC(苹果全球开发者大会)的一场与Objective-C相关的讲座上,开发者的
人生观被颠覆了。
作为一个开发者,管理好自己程序所使用的内存是天经地义的事,好比人们在溜狗时必
须清理狗的排泄物一样(美国随处可见“Clean up after your dogs”的标志)。在本
科阶段上C语言的课程时,教授们会向学生反复强调:如果使用malloc函数申请了一块
内存,使用完后必须再使用free函数把申请的内存还给系统——如果不还,会造成“内
存泄漏”的结果。这对于Hello World可能还不算严重,但对于庞大的程序或是长时间
运行的服务器程序,泄内存是致命的。如果没记住,自己还清理了两次,造成的结果则
严重得多——直接导致程序崩溃。
Objective-C有类似malloc/free的对子,叫alloc/dealloc,这种原始的方式如同管理C
内存一样困难。所以Objective-C中的内存管理又增... 阅读全帖
d****n
发帖数: 1241
7
来自主题: Programming版 - C++ 11问题:emplace_back()
新的gcc,比如4.8.0,error message已经好很多了
clang页面上提供的对比比较老了。
clang提供相对准确的错误信息的一个主要原因是所有的
在clang的ast里,有对节点所对应的在source code
里的位置精确的描述。所以在报错的时候,能比较准确的定位。
我感觉clang还有一个好的地方就是模块化好,
新人相对容易上手(这个也可以归结为user friendly).
另外就是clang容易扩展,在clang的基础上开发针对c/c++的
程序分析,代码重构这样的工具比较方便。使用clang的内部
功能,只需要把对应的库链接进自己的工具里,然后
调用接口就可以了.
S*A
发帖数: 7142
8
bootstrap 是给 compiler 自己 compiler 自己。
例如有个新的 C compiler, 就叫 clang 吧。
clang 最早是用 gcc 开发出来的,当 clang 成熟到
一定程度的时候,就可以用 clang 来取代 gcc 来
编译 clang 自己。那末以后版本的 clang 就可以
不依赖于 gcc 了。bootstrap 大概就是这个意思吧。
d****n
发帖数: 1241
9
来自主题: Programming版 - C++ 11问题:emplace_back()
google现在颇有些人在为clang贡献代码。
obj-c不太清楚,没有用过。不过从开源出来的
clang版本而言,抛开obj-c,clang还是一个对于gcc而言极有
竞争力的产品。好像现在openbsd还是其他一个bsd的版本,已经
替换gcc为clang了。
有竞争对于编译器的使用者而言,是好事情:)
gcc前段时间花大力气改进了内部的模块化,
我感觉clang的存在也是gcc做这个改进的驱动之一

because
In
for
d******e
发帖数: 2265
10
来自主题: Programming版 - 感觉python的前途堪忧 (转载)
转帖:
克里斯可以说是天才少年和好学生的代名词,他在2000年本科毕业之后,继续攻读计算
机硕士和博士。但克里斯并不是宅男,学习之余他手捧「龙书」游历世界,成为德智体
美劳全面发展的好学生。之后就是一篇又一篇的发表论文,硕士毕业论文即提出了一套
完整的运行时编译思想,奠定了 LLVM 的发展基础,读博期间 LLVM 编译框架在他的领
导下得到了长足的发展,已经可以基于 GCC 前端编译器的语义分析结果进行编译优化
和代码生成,所以克里斯在2005年毕业的时候已经是业界知名的编译器专家了。
注:很多计算机专业的大学生经常问我在大学里学点什么好,看看克里斯就行了。以目
前的科技信息开放程度,如果你在自己感兴趣的领域里用心耕耘,再加上那么一点点天
分,毕业时成为某一个专有领域的专家应该不是问题。那时就不是你满世界去找工作了
,而是工作满世界来找你!
克里斯毕业的时候正是苹果为了编译器焦头烂额的时候,因为苹果之前的软件产品都依
赖于整条 GCC 编译链,而开源界的这帮大爷并不买苹果的帐,他们不愿意专门为了苹
果公司的要求优化和改进 GCC 代码,所以苹果一怒之下将编译器后端直接替换为 LLVM... 阅读全帖
r*********r
发帖数: 3195
11
来自主题: Programming版 - 专业c++程序员都用什么ide (转载)
你到命令行下试试, 现在的 lion 带了三个编译器, g++-4.2, g++, clang++
缺省的 g++ 就是带了 llvm 模块的 g++.
你所谓的 llvm, 即 xcode 4.1 使用的编译器, 是 clang++, 就是带了 llvm 模块的
clang++.
还有什么 "libcxx 用 llvm 自己重新写", 更是说不通. 无非就是把libcxx 的源码拿
来,用 clang++ 重新编译一遍.
d********g
发帖数: 10550
12
来自主题: Programming版 - 被苹果给惊呆了!! (转载)
Clang/LLVM才是趋势吧。本来BSD系的就不怎么鸟GNU/Linux,FreeBSD不久前也全线抛
弃GCC了
OS X:
$ g++ --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx
-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 7.0.0 (clang-700.1.76)
Target: x86_64-apple-darwin15.0.0
Thread model: posix
FreeBSD:
$ clang --version
FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512
Target: x86_64-unknown-freebsd10.2
Thread model: posix
GPL不是啥灵丹妙药,open source也并非GNU的天下
d********g
发帖数: 10550
13
来自主题: Programming版 - 被苹果给惊呆了!! (转载)
Clang/LLVM才是趋势吧。本来BSD系的就不怎么鸟GNU/Linux,FreeBSD不久前也全线抛
弃GCC了
OS X:
$ g++ --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx
-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 7.0.0 (clang-700.1.76)
Target: x86_64-apple-darwin15.0.0
Thread model: posix
FreeBSD:
$ clang --version
FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512
Target: x86_64-unknown-freebsd10.2
Thread model: posix
GPL不是啥灵丹妙药,open source也并非GNU的天下
d****i
发帖数: 4809
14
用Clang吧,好像FreeBSD的最新版本的C编译器为了和Linux区分开来都把cc设置成
Clang了。Mac就是一个打扮漂亮的女人味同性恋味傻瓜化的FreeBSD, 而且Clang又是背
后苹果资助的,所以。。。

CS
d****i
发帖数: 4809
15
来自主题: Programming版 - 被苹果给惊呆了!! (转载)
FreeBSD把它的默认的cc从GCC改成clang是有原因的,主要是GCC采用GPL license,和
FreeBSD的BSD license的完全自由随便自个儿改的理念不一样。而并非clang比gcc好。
实际上gcc还是比clang要成熟稳定很多。

gxx
d****i
发帖数: 4809
16
来自主题: Programming版 - 被苹果给惊呆了!! (转载)
FreeBSD把它的默认的cc从GCC改成clang是有原因的,主要是GCC采用GPL license,和
FreeBSD的BSD license的完全自由随便自个儿改的理念不一样。而并非clang比gcc好。
实际上gcc还是比clang要成熟稳定很多。

gxx
l*******m
发帖数: 1096
17
不是os的差别,是compilers的差别,clang比gcc是优化的好些。
http://www.phoronix.com/scan.php?page=article&item=clang-37-gcc

binary)
S*A
发帖数: 7142
18
来自主题: Linux版 - 弱问编译器是executable吗?
The gcc use a host cc to compile itself.
The it used the compiled gcc to compile the gcc
again to get to the right result.
You need a host CC to bootstrap your own C
compiler. The first UNIX cc is written in asm.
Now days every one just use gcc to boot strap.
Clang does that too. Now days Clang can compile
itself.
d********g
发帖数: 10550
19
FreeBSD的pkg(pkgng)才出来多久(2012年底2013年初),以前只有ports编译当然不
方便用了
还有因为GPL v3的原因,之前一直卡在老版本的GCC没法升级。FreeBSD 10开始换用
Clang,现在已经没有这个限制了(2014年初)。OpenBSD里GCC还是4.2.1,一直在讨论
是不是要换Clang或者别的
FreeBSD的虚拟化bhyve也是FreeBSD 10才出来的(2014年初)
这些重大更新都是近几年发生的,质量都很高。FreeBSD 8的时候就试过,那时感觉不
是一般难用。到了10,用起来和Linux比没什么不顺手的,而且系统特别整洁非常适合
强迫症,比Ubuntu这些乱糟糟的发行版强多了(当然Arch也是小而整洁)
东西好不好试过才知道
r*********r
发帖数: 3195
20
来自主题: Programming版 - 专业c++程序员都用什么ide (转载)
when you say llvm, do you mean something else, like Clang?
llvm was a code generator, and can be used to replace the existing one in
the gcc stack.
recently there's new front-end parsers like Clang, which is re-designed to
work with llvm.
now "apple llvm" is a marketing term coined by apple, don't be confused.
r*********r
发帖数: 3195
21
来自主题: Programming版 - 专业c++程序员都用什么ide (转载)
after reading the Xcode 4 marketing stuff, now i'm pretty sure
"apple llvm" = Clang front-end parser + llvm back-end
for Xcode 3, the stack is gcc front-end parser + llvm back-end
Clang parser compiles faster than the gcc parser,
only because it doesn't do as much work !
the compiled code quality is actually worse. (the executable
runs slower) The advantage is that by doing less, the output is
easier to understand, both by human and by IDE.
S**I
发帖数: 15689
22
来自主题: Programming版 - 问一个volatile和memcpy一起用的问题
我拿几个编译器试了一下,默认的编译设置下,所有的编译器都是给warning,但是允
许通过:
GCC 4.8
LLVM-GCC 4.2.1
Clang
ICC
Visual C++
GCC 4.8, LLVM-GCC 4.2.1和Clang的warning message里明确说明编译的时候volatile
给去掉了,ICC和VC没说,不过我估计实现也差不多。
d****i
发帖数: 4809
23
来自主题: Programming版 - C++ 11问题:emplace_back()
clang is mainly driven by Apple. So it is not as neutral as gcc. Apple was
trying to maintain its obj-c through clang. But people don't buy it because
obj-c is considered to be apple's own language, plus its syntax is ugly. In
traditional UNIX system, cc (and its variants) is the gold standard norm for
C compiler. gcc is just a GNU clone for cc on Unix.
d****n
发帖数: 1241
24
来自主题: Programming版 - C++问题: 指针变量是哪里产生的?

前段时间看见CLANG的邮件列表里有人讨论,也许不用多久,会加入到clang的
undefined behavior sanitizer里了。
a*****e
发帖数: 1700
25
来自主题: Programming版 - c++的一个诡异问题,高手请进
编译器的问题。用 clang++ 试了一下,两个时间是一样的。
如果用 clang++ -O2 的化,还需要打印 Value 的值,否则整个计算被忽略掉了。
m********5
发帖数: 17667
26
来自主题: Programming版 - 谁能推荐一个支持Cmake的C++ IDE
eclipse CDT基本搞不定啊,太难用了只能手工cmake产生makefile project. 那个啥
CDT4 generator很难用。而且对Clang支持一点不好。
要求:是IDE, code completion 要smart, 能分析大量template. 静态分析支持c++11.
可以快捷键从declaration里面生成implementation code block. 有一些refactor
code功能。支持clang和gcc
速读别太慢就行。
qtcreator感觉对Qt本身支持不错,但其他的就马马虎虎了
Kdevelop 4谁用过么?功能稳定么?
CLion要按年收费,而且刚出来1.0,不知道怎么样?
netbeans呢?
d****i
发帖数: 4809
27
来自主题: Programming版 - 被苹果给惊呆了!! (转载)
很好奇如果用Mac OS X下的Clang编译后运行的结果是怎样的?哪个装了Clang编译器的
来说说?
d****i
发帖数: 4809
28
来自主题: Programming版 - 被苹果给惊呆了!! (转载)
很好奇如果用Mac OS X下的Clang编译后运行的结果是怎样的?哪个装了Clang编译器的
来说说?
s****a
发帖数: 238
29
等clang成熟后代码分析会方便很多,现在已经有emacs上的auto-complete插件了
z****e
发帖数: 54598
30
克里斯跑去做swift了,与其寄希望于clang,不如去学swift
swift以后会有真正的ide
b******s
发帖数: 1572
31
来自主题: Military版 - 以色列国歌怎么这么好听!
Little orphans in the snow
With nowhere to call a home
Start their singing, singing
Waiting through the summertime
To thaw your hearts in wintertime
That's why they're singing, singing
Waiting for a sign
To turn blood into wine
The sweet taste in your mouth
Turned bitter in its glass
Israel, in Israel
Israel, in Israel
Shattered fragments of the past
Meet in veins on the stained glass
Like the lifeline in your palm
Red and green reflects the scene
Of a long forgotten dream
There were princes and... 阅读全帖
t*******h
发帖数: 2744
32
Little orphans in the snow
With nowhere to call a home
Start their singing
Waiting through the summertime
To thaw your hearts in wintertime
That's why they're singing
Waiting for a sign to turn blood into wine
The sweet taste in your mouth -- turned bitter in its glass
Israel... in Israel
Israel... in Israel
Shattered fragments of the past
Meet in veins on the stained glass
Like the lifeline in your palm
Red and green reflects the scene
Of a long forgotten dream
There were princes and there were... 阅读全帖
F*****O
发帖数: 338
33
来自主题: Military版 - 龙芯都跟随北斗上天用了
你是专家啊。
网上看了一下, 多数人都指出那个1/10跑分是因为jit没有优化。
编译路漫漫
程序语言 | 编译技术 | 开源软件
Home IDE Research Security SpiderMonkey Tricks Unix/Linux V8 Web 编译 闲谈
Home > 闲谈 > 龙芯CPU的JavaScript性能
龙芯CPU的JavaScript性能
June 14th, 2015Leave a commentGo to comments
这是4月份的新闻的评论,一直没有时间来写,拖了两个月了。
四月份的时候,类似“龙芯性能不到iPhone6 A8性能的1/10?”的新闻[1][2][3]又一
次把龙芯拉出来被人吐槽。其中出现 1/10 对比的一项是 SunSpider 测试,SPEC
CINT2000 的测试差异没有那么大。另外没有贴出来 SPEC CFP2000 的分数对比。
作为一度天天跑SPEC和SunSpider等Benchmark的人来说,新闻中的测试报告是没有可信
度的。性能测评需要有一套完整的流程,才能够确认自己获得的测评分数是正确的。不
同的... 阅读全帖
l****z
发帖数: 29846
34
来自主题: USANews版 - Tintin vs. Walter Duranty, Stalin Stooge
By Arnold Cusmariu
Steven Spielberg's just-released 3D animated feature combining stories in
three Tintin books had me clapping with delight as the credits rolled. I
won't spill what happens; you can read on without fear of spoilers.
The Tintin books began in 1929 as a comic strip under the skillful pen of
Belgian artist Georges Remi (1907-1983), aka Hergé -- reverse his initials
and say them in French. The strip first appeared on 10 January 1929 in a
children's supplement of the conservative ... 阅读全帖
p********r
发帖数: 176
35
The one great service of Donald Trump's extended peregrinations on
immigration policy is to have demonstrated how, in the end, there's only one
place to go.
You can rail for a year about the squishy soft, weak-kneed and stupid
politicians who have opened our borders to the wretched refuse of Mexico.
You can promise to round them up -- the refuse, that is, not the politicians
(they're next) -- and deport them. And that may win you a plurality of
Republican primary votes.
But eventually you have t... 阅读全帖
f**********n
发帖数: 29853
36
求求你,不要卖弄你这几个狗屁不通的破单词了。。。正宗的叫法是service advisor
。你读一秒钟判决书就知道。
真正的以理服人不是靠卖弄单词,举个例子。托马斯以国会在这件事情上沉默了五十几
年为依据,说明那些靠立法历史的法官也不应该相应奥巴马的号召改变传统给他们加班费
Even for those Members of this Court who consider legislative history,
silence in the legislative history, “no matter how clanging,” cannot
defeat the better reading of the text and statutory context. If the text is
clear, it needs no repetition in the legislative history; and if the text is
ambiguous, silence in the legislative history cannot lend any clarit... 阅读全帖
W***n
发帖数: 11530
37
来自主题: Automobile版 - Toyota Sienna complaints
Toyota Sienna
HomeAutomotiveCar Models Last updated: 08/07/2017
Consumer Complaints and Reviews
Nancy of Chatham, NJ on July 28, 2017
Satisfaction Rating
I purchased my Toyota Sienna 2013 XLE new. After 3 1/2 years and 39,000
miles, I have had to replace a full set of run flat tires 4 times, brake
pads and now have been informed that I need to replace the shocks and struts
and the tires again (since they are wearing unevenly due to the first issue
). To top that all off, the cable to the automat... 阅读全帖
b********n
发帖数: 38600
38
I may be able to speak the languages of human beings and even of angels, but
if I have no love, my speech is no more than a noisy gong or a clanging
bell. I may have the gift of inspired preaching; I may have all knowledge
and understand all secrets; I may have the faith needed to move mountains-
but if I have no love, I am nothing. I may give away everything I have, and
even give up my body to be burned-but if I have no love, this does me no
good.
~1 Corinthians 13:1-13

注意: “I may have the fai... 阅读全帖
b********n
发帖数: 38600
39
I may be able to speak the languages of human beings and even of angels, but
if I have no love, my speech is no more than a noisy gong or a clanging
bell. I may have the gift of inspired preaching; I may have all knowledge
and understand all secrets; I may have the faith needed to move mountains-
but if I have no love, I am nothing. I may give away everything I have, and
even give up my body to be burned-but if I have no love, this does me no
good.
~1 Corinthians 13:1-13

注意: “I may have the fai... 阅读全帖
D*****t
发帖数: 558
40
来自主题: Investment版 - 关于401K 中使用MPT的思考
wow, i went through several pages of that thread. as some one said, this is
indeed an EPIC thread. the guy ( with the name Marketimer who tried the idea
of the book) is extremely intelligent and writes like a master. In a style
almost like a diary, he documented his agonizing journey from 2007 up till
now. this is an excerpt he wrote on nov 15, 2008. SP500 was at 800 two days
later.
"...Just a few days earlier, MYR 2.0 had crash landed at S&P 821. I received
the news by email on my iPhone at Qdo... 阅读全帖
g***i
发帖数: 4272
41
clang,觉得比g++好用
A*********c
发帖数: 430
42
来自主题: JobHunting版 - 臭名昭著的skyline问题
emplace_back() 比 push_back()更加效率一点。
新的c++11的feature用gcc 4.8或者比较新的clang++都支持。
n********e
发帖数: 41
43
来自主题: JobHunting版 - Leetcode的系统真是弱爆了
楼主 看到 你 isDiffByOne 函数就知道你必然要超时
Leetcode免费给你用 就别挑剔了。凡事要先从自身找问题
你那个测试不是大数据
真正的大数据在这里:
start = "nanny";
end = "aloud";
String[] d = {"ricky","grind","cubic","panic","lover","farce","gofer
","sales","flint","omens","lipid","briny","cloth","anted","slime","oaten","
harsh","touts","stoop","cabal","lazed","elton","skunk","nicer","pesky","
kusch","bused","kinda","tunis","enjoy","aches","prowl","babar","rooms","
burst","slush","pines","urine","pinky","bayed","mania","light","flare","
wares","wom... 阅读全帖
M********0
发帖数: 1230
44
来自主题: JobHunting版 - 问个简单coding问题
编译器的问题
gcc 给出的是
1 2
4 3
clang和icpc给出的是
1 2
3 4
m*****g
发帖数: 71
45
用Mac的,图方便就用Clang了
s******c
发帖数: 1920
46
clang比gdb好
d******b
发帖数: 73
47
好在哪里?
难道就是因为编译得快?那我还会说Clang 代码优化的不好呢?
难道就是因为彩色的错误提示?那你就不用GDB了呢?

发帖数: 1
48
来自主题: JobHunting版 - The Programming Technologies Lab of Huawei
Position: Software Engineer
Location: Bellevue, WA
Duration: 6+ Months
Description:
Job responsibility The Programming Technologies Lab of Huawei is seeking
candidates with expertise in the area of compiler implementation and
optimization. As a software engineer contractor, you will work in a highly
talented team, and are expected to contribute to the design and
implementation of a new general purpose programming language, as well as
building prototypes and production code using the new language... 阅读全帖
d******b
发帖数: 73
49
肯定有,十五六年前 MS 也不是这个死结么?最后移动端出来,MS就彻底没有招了,移
动端都是 linux/unix的。。所以 MS 也被牵着鼻子 弄了很多当年他不愿意做的事。比
如 VS 引入clang 交叉编译还有 linux 子系统 什么的。
1 2 3 4 下页 末页 (共4页)