mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-30 21:09:38 +03:00
6f1db5f37e
We already enable -DDEBUG unconditionally (meaning regardless of this is a debug build or a performance build) for zdb and ztest as they are mostly used for development and debugging. This patch enables -DDEBUG for libzpool extending the debugging checks for zdb, ztest, and a couple of other test utilities. In addition to passing -DDEBUG we also enable -DZFS_DEBUG so all assertion checks work s expected. We do so not only in libzpool but in every utility that links to it, even if the utility doesn't directly use any functionality wrapped in ZFS_DEBUG macro definitions. The reason is that these utilities may still include headers that contain structs that have more fields when ZFS_DEBUG is defined. This can be a problem as enabling that flag for libzpool but not for zdb can lead into random problems (e.g. segmentation faults) as zdb may be have an incorrect view of a struct passed to it by libzpool. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Matthew Ahrens <mahrens@delphix.com> Signed-off-by: Serapheim Dimitropoulos <serapheim@delphix.com> Closes #10549
33 lines
900 B
Makefile
33 lines
900 B
Makefile
#
|
|
# This file and its contents are supplied under the terms of the
|
|
# Common Development and Distribution License ("CDDL"), version 1.0.
|
|
# You may only use this file in accordance with the terms of version
|
|
# 1.0 of the CDDL.
|
|
#
|
|
# A full copy of the text of the CDDL should have accompanied this
|
|
# source. A copy of the CDDL is also available via the Internet at
|
|
# http://www.illumos.org/license/CDDL.
|
|
#
|
|
|
|
#
|
|
# Copyright (c) 2019 by Delphix. All rights reserved.
|
|
#
|
|
|
|
include $(top_srcdir)/config/Rules.am
|
|
|
|
pkgexecdir = $(datadir)/@PACKAGE@/zfs-tests/bin
|
|
|
|
DEFAULT_INCLUDES += \
|
|
-I$(top_srcdir)/include \
|
|
-I$(top_srcdir)/lib/libspl/include
|
|
|
|
# Unconditionally enable ASSERTs
|
|
AM_CPPFLAGS += -DDEBUG -UNDEBUG -DZFS_DEBUG
|
|
|
|
pkgexec_PROGRAMS = btree_test
|
|
btree_test_SOURCES = btree_test.c
|
|
|
|
btree_test_LDADD = \
|
|
$(abs_top_builddir)/lib/libzpool/libzpool.la \
|
|
$(abs_top_builddir)/lib/libzfs_core/libzfs_core.la
|