Matt Turner <matts...@gmail.com> writes: > Someone asked about my Mesa build set up. Rather than sending it > privately I figured I'd post it for posterity on mesa-dev. > > I build with > > CFLAGS="-O2 -march=native -pipe" CXXFLAGS="$CFLAGS" ./autogen.sh > --with-dri-drivers=i965 --with-gallium-drivers= > --with-egl-platforms=x11,drm --enable-glx-tls --enable-gles1 > --enable-gles2 > > --enable-debug enables assertions and builds with -g, but also > silently adds -O0 to your CFLAGS. > > My build set up consists of > > ~/projects/mesa - contains mesa git checkout > ~/projects/mesa-release - release build directory > ~/projects/mesa-debug - debug build directory > > I do out-of-tree builds into the debug and release directories by > running ../mesa/autogen.sh ... from each of them, with the only > difference being the --enable-debug flag. > > Environment variables allow you to use your built mesa without > installing it: LIBGL_DRIVERS_PATH, LD_LIBRARY_PATH. Mesa's build > system links built files into $(builddir)/$(libdir), e.g., > ~/projects/mesa-release/lib/. I use some wrapper scripts to allow me > to easily run programs against my Mesa builds:
For anyone that's curious about how I work: My scripts setup looks a lot like Matt's. I don't do OOT builds, and instead I just have 6 main trees: ~/src/mesa (normal debug build) ~/src/mesa-release (non-debug build) ~/src/mesa-clean (usually HEAD~1 of ~/src/mesa) ~/src/32/mesa ~/src/32/mesa-release ~/src/32/mesa-clean The debug build also is with -O2 so that I can actually get mostly-representative performance results while developing. REALLY IMPORTANT: Don't forget -fno-omit-frame-pointer on 64-bit, otherwise you won't get backtraces from sysprof and perf (similarly, in your kernel, CONFIG_FRAME_POINTER=y). I think the most important feature of my setup is the clean builds. By having copies of unmodified mesa along with patched mesa, I can use http://anholt.net/compare-perf/ to easily produce stats to test whether my change is actually having the desired effect.
pgpYJewFo4iqr.pgp
Description: PGP signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev