Kaydet (Commit) 3bdb950f authored tarafından Michael Stahl's avatar Michael Stahl

RepositoryExternal: fix gb_LinkTarget__use_valgrind

... which i've also managed to break, unaware of its existence.
Consolidate 2 different ways to use VALGRIND_CFLAGS.

Change-Id: I245c7a9a2b6bc904a227a15063cf5d8a2f64313c
üst d91c3727
...@@ -1527,11 +1527,13 @@ endef ...@@ -1527,11 +1527,13 @@ endef
endif # SYSTEM_CURL endif # SYSTEM_CURL
ifneq ($(VALGRIND_CFLAGS),) # strip because of gb_SPACE
ifneq ($(strip $(VALGRIND_CFLAGS)),)
define gb_LinkTarget__use_valgrind define gb_LinkTarget__use_valgrind
$(call gb_LinkTarget_add_defs,$(1),\ $(call gb_LinkTarget_add_defs,$(1),\
-DHAVE_VALGRIND_H \ -DHAVE_VALGRIND_H \
-DHAVE_MEMCHECK_H \
) )
$(call gb_LinkTarget_set_include,$(1),\ $(call gb_LinkTarget_set_include,$(1),\
......
...@@ -5057,9 +5057,6 @@ if test "$cross_compiling" != "yes" -a -n "$ENABLE_DBGUTIL" -a \ ...@@ -5057,9 +5057,6 @@ if test "$cross_compiling" != "yes" -a -n "$ENABLE_DBGUTIL" -a \
CPPFLAGS=$VALGRIND_CFLAGS CPPFLAGS=$VALGRIND_CFLAGS
AC_CHECK_HEADER([memcheck.h], [], [VALGRIND_CFLAGS=""]) AC_CHECK_HEADER([memcheck.h], [], [VALGRIND_CFLAGS=""])
fi fi
if test -n "$VALGRIND_CFLAGS"; then
VALGRIND_CFLAGS="${VALGRIND_CFLAGS} -DHAVE_MEMCHECK_H=1"
fi
CPPFLAGS=$prev_cppflags CPPFLAGS=$prev_cppflags
fi fi
AC_SUBST([VALGRIND_CFLAGS]) AC_SUBST([VALGRIND_CFLAGS])
......
...@@ -40,7 +40,6 @@ $(eval $(call gb_Library_set_include,sal,\ ...@@ -40,7 +40,6 @@ $(eval $(call gb_Library_set_include,sal,\
)) ))
$(eval $(call gb_Library_add_defs,sal,\ $(eval $(call gb_Library_add_defs,sal,\
$(VALGRIND_CFLAGS) \
$(if $(filter $(ALLOC),SYS_ALLOC TCMALLOC JEMALLOC), \ $(if $(filter $(ALLOC),SYS_ALLOC TCMALLOC JEMALLOC), \
-DFORCE_SYSALLOC \ -DFORCE_SYSALLOC \
) \ ) \
...@@ -60,6 +59,10 @@ $(eval $(call gb_Library_use_libraries,sal,\ ...@@ -60,6 +59,10 @@ $(eval $(call gb_Library_use_libraries,sal,\
$(gb_UWINAPI) \ $(gb_UWINAPI) \
)) ))
$(eval $(call gb_Library_use_externals,sal,\
valgrind \
))
$(eval $(call gb_Library_use_system_win32_libs,sal,\ $(eval $(call gb_Library_use_system_win32_libs,sal,\
advapi32 \ advapi32 \
comdlg32 \ comdlg32 \
......
...@@ -470,10 +470,6 @@ vcl_headless_code=\ ...@@ -470,10 +470,6 @@ vcl_headless_code=\
vcl/headless/svptext \ vcl/headless/svptext \
vcl/headless/svpvd vcl/headless/svpvd
$(eval $(call gb_Library_add_defs,vcl,\
$(VALGRIND_CFLAGS) \
))
ifeq ($(GUIBASE),unx) ifeq ($(GUIBASE),unx)
$(eval $(call gb_Library_add_defs,vcl,\ $(eval $(call gb_Library_add_defs,vcl,\
-DSAL_DLLPREFIX=\"$(gb_Library_SYSPRE)\" \ -DSAL_DLLPREFIX=\"$(gb_Library_SYSPRE)\" \
...@@ -497,6 +493,7 @@ $(eval $(call gb_Library_use_externals,vcl,\ ...@@ -497,6 +493,7 @@ $(eval $(call gb_Library_use_externals,vcl,\
dbus \ dbus \
fontconfig \ fontconfig \
freetype \ freetype \
valgrind \
x11extensions \ x11extensions \
)) ))
endif endif
......
...@@ -56,6 +56,7 @@ $(eval $(call gb_Library_use_externals,vclplug_gen,\ ...@@ -56,6 +56,7 @@ $(eval $(call gb_Library_use_externals,vclplug_gen,\
graphite \ graphite \
icule \ icule \
icuuc \ icuuc \
valgrind \
Xrender \ Xrender \
)) ))
...@@ -122,10 +123,6 @@ $(eval $(call gb_Library_add_defs,vclplug_gen,\ ...@@ -122,10 +123,6 @@ $(eval $(call gb_Library_add_defs,vclplug_gen,\
)) ))
endif endif
$(eval $(call gb_Library_add_defs,vclplug_gen,\
$(VALGRIND_CFLAGS) \
))
## handle Xinerama ## handle Xinerama
ifneq ($(USE_XINERAMA),NO) ifneq ($(USE_XINERAMA),NO)
ifneq ($(OS)$(USE_XINERAMA_VERSION),SOLARISXsun) ifneq ($(OS)$(USE_XINERAMA_VERSION),SOLARISXsun)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment