mirror of https://github.com/citusdata/citus.git
Modernize coverage options
These hadn't been looked at in a while, and I'm somewhat certain they actually were running with optimization on, which is pretty bad. Swapped out the lower-level flags for `--coverage`, which will work with both `clang` and `gcc`. On some platforms, linker flags are need- ed as well.pull/2616/head
parent
5db45bac45
commit
1b605a6109
|
@ -69,7 +69,7 @@ endif
|
||||||
|
|
||||||
# Add options passed to configure or computed therein, to CFLAGS/CPPFLAGS/...
|
# Add options passed to configure or computed therein, to CFLAGS/CPPFLAGS/...
|
||||||
override CFLAGS += @CFLAGS@ @CITUS_CFLAGS@
|
override CFLAGS += @CFLAGS@ @CITUS_CFLAGS@
|
||||||
override CPPFLAGS := @CPPFLAGS@ -I '${citus_abs_top_srcdir}/src/include' -I'${citus_top_builddir}/src/include' $(CPPFLAGS)
|
override CPPFLAGS := @CPPFLAGS@ @CITUS_CPPFLAGS@ -I '${citus_abs_top_srcdir}/src/include' -I'${citus_top_builddir}/src/include' $(CPPFLAGS)
|
||||||
override LDFLAGS += @LDFLAGS@ @CITUS_LDFLAGS@
|
override LDFLAGS += @LDFLAGS@ @CITUS_LDFLAGS@
|
||||||
|
|
||||||
# optional file with user defined, additional, rules
|
# optional file with user defined, additional, rules
|
||||||
|
|
|
@ -625,6 +625,7 @@ LIBOBJS
|
||||||
POSTGRES_BUILDDIR
|
POSTGRES_BUILDDIR
|
||||||
POSTGRES_SRCDIR
|
POSTGRES_SRCDIR
|
||||||
CITUS_LDFLAGS
|
CITUS_LDFLAGS
|
||||||
|
CITUS_CPPFLAGS
|
||||||
CITUS_CFLAGS
|
CITUS_CFLAGS
|
||||||
EGREP
|
EGREP
|
||||||
GREP
|
GREP
|
||||||
|
@ -4052,7 +4053,9 @@ if test "${enable_coverage+set}" = set; then :
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$enable_coverage" = yes; then
|
if test "$enable_coverage" = yes; then
|
||||||
CITUS_CFLAGS="$CITUS_CFLAGS -fprofile-arcs -ftest-coverage"
|
CITUS_CFLAGS="$CITUS_CFLAGS -O0 -g --coverage"
|
||||||
|
CITUS_CPPFLAGS="$CITUS_CPPFLAGS -DNDEBUG"
|
||||||
|
CITUS_LDFLAGS="$CITUS_LDFLAGS --coverage"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -4183,7 +4186,9 @@ _ACEOF
|
||||||
|
|
||||||
CITUS_CFLAGS="$CITUS_CFLAGS"
|
CITUS_CFLAGS="$CITUS_CFLAGS"
|
||||||
|
|
||||||
CITUS_LDFLAGS="$LIBS"
|
CITUS_CPPFLAGS="$CITUS_CPPFLAGS"
|
||||||
|
|
||||||
|
CITUS_LDFLAGS="$LIBS $CITUS_LDFLAGS"
|
||||||
|
|
||||||
POSTGRES_SRCDIR="$POSTGRES_SRCDIR"
|
POSTGRES_SRCDIR="$POSTGRES_SRCDIR"
|
||||||
|
|
||||||
|
|
|
@ -170,7 +170,9 @@ CITUSAC_PROG_CC_CFLAGS_OPT([-Werror=vla]) # visual studio does not support thes
|
||||||
#
|
#
|
||||||
AC_ARG_ENABLE([coverage], AS_HELP_STRING([--enable-coverage], [build with coverage testing instrumentation]))
|
AC_ARG_ENABLE([coverage], AS_HELP_STRING([--enable-coverage], [build with coverage testing instrumentation]))
|
||||||
if test "$enable_coverage" = yes; then
|
if test "$enable_coverage" = yes; then
|
||||||
CITUS_CFLAGS="$CITUS_CFLAGS -fprofile-arcs -ftest-coverage"
|
CITUS_CFLAGS="$CITUS_CFLAGS -O0 -g --coverage"
|
||||||
|
CITUS_CPPFLAGS="$CITUS_CPPFLAGS -DNDEBUG"
|
||||||
|
CITUS_LDFLAGS="$CITUS_LDFLAGS --coverage"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -201,7 +203,8 @@ AC_DEFINE_UNQUOTED(REPORTS_BASE_URL, "$REPORTS_BASE_URL",
|
||||||
[Base URL for statistics collection and update checks])
|
[Base URL for statistics collection and update checks])
|
||||||
|
|
||||||
AC_SUBST(CITUS_CFLAGS, "$CITUS_CFLAGS")
|
AC_SUBST(CITUS_CFLAGS, "$CITUS_CFLAGS")
|
||||||
AC_SUBST(CITUS_LDFLAGS, "$LIBS")
|
AC_SUBST(CITUS_CPPFLAGS, "$CITUS_CPPFLAGS")
|
||||||
|
AC_SUBST(CITUS_LDFLAGS, "$LIBS $CITUS_LDFLAGS")
|
||||||
AC_SUBST(POSTGRES_SRCDIR, "$POSTGRES_SRCDIR")
|
AC_SUBST(POSTGRES_SRCDIR, "$POSTGRES_SRCDIR")
|
||||||
AC_SUBST(POSTGRES_BUILDDIR, "$POSTGRES_BUILDDIR")
|
AC_SUBST(POSTGRES_BUILDDIR, "$POSTGRES_BUILDDIR")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue