# llvm on FreeBSD



## kr651129 (Sep 15, 2012)

I've been reading a lot about llvm lately and was wondering if it would be a better default compiler than gcc on FreeBSD?  Are there any major advantages with llvm over gcc other than objective c? I remember reading somewhere that in 9.-RC1 it has better objective c support.


----------



## Uniballer (Sep 15, 2012)

I have played with clang 3.1 on 9.1 pre-release.  Compilation is faster than gcc 4.2.1, and the diagnostics, code checking and static analysis are far better (I normally compile my stuff -std=c99 -Wall -Werror).  Naturally, this causes problems for code that plays fast and loose.  In my limited experience the generated code still runs very slightly slower than the code gcc generates.  I expect that will continue to improve.


----------



## kr651129 (Sep 15, 2012)

I keep hearing that llvm is faster at compiling that gcc. but how much faster is it really?


----------



## noobster (Sep 15, 2012)

Some benchmarks that were recently posted on the mailing lists: http://lists.freebsd.org/pipermail/freebsd-current/2012-September/036380.html


----------

