Skip to contentSkip to conversation

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

DISCUSSION Dieter Nützel 2 participants 2 messages Jan 26, 2015 – Jan 27, 2015

lore
Share & tools
lore
#0 lore raw

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

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

It breaks with 'killed' not known.

Thanks,
Dieter
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#1 lore raw
Quoted 7 lines · Dieter Nützel

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.

Quoted 2 lines

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

Not to me.

Signature · 6 lines
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel