0
0
mirror of https://github.com/OpenVPN/openvpn3.git synced 2024-09-20 12:12:15 +02:00

Debugging: added header and build flag for valgrind run-time

extensions.

Signed-off-by: James Yonan <james@openvpn.net>
This commit is contained in:
James Yonan 2017-10-24 00:57:30 -06:00 committed by Antonio Quartulli
parent b948cde4c3
commit 2b4c85091d
2 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,29 @@
// OpenVPN -- An application to securely tunnel IP networks
// over a single port, with support for SSL/TLS-based
// session authentication and key exchange,
// packet encryption, packet authentication, and
// packet compression.
//
// Copyright (C) 2012-2017 OpenVPN Technologies, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License Version 3
// as published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program in the COPYING file.
// If not, see <http://www.gnu.org/licenses/>.
#pragma once
#if defined(HAVE_VALGRIND)
#include <valgrind/memcheck.h>
#define OPENVPN_MAKE_MEM_DEFINED(addr, len) VALGRIND_MAKE_MEM_DEFINED(addr, len)
#else
#define OPENVPN_MAKE_MEM_DEFINED(addr, len)
#endif

View File

@ -48,6 +48,7 @@ if [ -z "$1" ]; then
echo " LZ4_SYS=1 -- build with system LZ4 compression library"
echo " SNAP=1 -- build with Snappy compression library"
echo " CITY=1 -- build with Cityhash hash library"
echo " VAL=1 -- build with valgrind run-time extensions"
echo " JAVA=1 -- build with JVM"
echo ' EXTRA_CPP="foo1.cpp foo2.cpp" -- add extra .cpp files'
echo " GTEST_DIR=<dir> -- specify googletest tree, required for building unit tests"
@ -240,6 +241,11 @@ if [ "$CITY" = "1" ]; then
CPPFLAGS="$CPPFLAGS -DHAVE_CITYHASH"
fi
# Valgrind
if [ "$VAL" = "1" ]; then
CPPFLAGS="$CPPFLAGS -DHAVE_VALGRIND"
fi
# JVM
if [ "$JAVA" = "1" ]; then
if [ -z "$JAVA_HOME" ]; then