[Mesa-dev] [PATCH] configure.ac: add --enable-llvmpipe-profile
Oded Gabbay
oded.gabbay at gmail.com
Thu Jan 7 08:27:04 PST 2016
To profile llvmpipe you need to define PROFILE in mesa's code. Currently,
this define can only be generated if mesa is built using scons.
This patch makes it possible to generate this define also when building
mesa through automake tools.
Signed-off-by: Oded Gabbay <oded.gabbay at gmail.com>
---
configure.ac | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/configure.ac b/configure.ac
index b1c1d7d..a2485da 100644
--- a/configure.ac
+++ b/configure.ac
@@ -476,8 +476,23 @@ AC_ARG_ENABLE([debug],
[enable_debug="$enableval"],
[enable_debug=no]
)
+
+AC_ARG_ENABLE([llvmpipe-profile],
+ [AS_HELP_STRING([--enable-llvmpipe-profile],
+ [enable profiling of llvmpipe JIT code @<:@default=disabled@:>@])],
+ [enable_llvmpipe_profile="$enableval"],
+ [enable_llvmpipe_profile=no]
+)
+
+if test "x$enable_llvmpipe_profile" = xyes; then
+ DEFINES="$DEFINES -DPROFILE"
+fi
+
if test "x$enable_debug" = xyes; then
DEFINES="$DEFINES -DDEBUG"
+ if test "x$enable_llvmpipe_profile" = xyes; then
+ AC_MSG_WARN([Debug and Profile are enabled at the same time])
+ fi
if test "x$GCC" = xyes; then
if ! echo "$CFLAGS" | grep -q -e '-g'; then
CFLAGS="$CFLAGS -g"
--
2.5.0
More information about the mesa-dev
mailing list