LLVM / Clang git for libclc: optimized build or debug?

Michel Dänzer michel at daenzer.net
Mon Jan 26 19:23:24 PST 2015


On 27.01.2015 04:20, Dieter Nützel wrote:
> make[1]: Leaving directory '/opt/llvm/bindings'
> llvm[0]: ***** Completed Debug+Asserts Build
> llvm[0]: ***** Note: Debug build can be 10 times slower than an
> llvm[0]: ***** optimized build. Use make ENABLE_OPTIMIZED=1 to
> llvm[0]: ***** make an optimized build. Alternatively you can
> llvm[0]: ***** configure with --enable-optimized.
> 304.322u 15.792s 1:50.25 290.3% 0+0k 6156432+1518784io 942pf+0w

FWIW, I use these debug vs. optimization related options for building LLVM:

'--enable-optimized' '--with-optimize-option=-O2  -ftree-vectorize
-march=amdfam10 -mtune=native' '--enable-assertions'
'--enable-debug-runtime' '--enable-debug-symbols'
'CPPFLAGS=-fno-omit-frame-pointer' 'CFLAGS=-fno-omit-frame-pointer'
'CXXFLAGS=-fno-omit-frame-pointer'

That gives good performance while preserving assertions and debugging
symbols. -march=amdfam10 (as opposed to -march=native or a newer AMD CPU
family) avoids generating machine code which valgrind can't handle, and
-fno-omit-frame-pointer allows profile call graphs to make sense.


> Second:
> 'make -j 4' do NOT work in the first run. --- Known?

Not to me.


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer


More information about the dri-devel mailing list