From b0ff9520c077338d1bf9617767d48299f7be662f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Mon, 26 May 2003 02:14:03 +0000 Subject: [PATCH] The Jamfile now compiles with -fcheck-memory if MALLOC_DEBUG is set. Of course, jam itself will also be checked then, which cries out loud for a better way to do this. But hey, it works :-) git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3333 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../kernel/file_systems/bfs/bfs_shell/Jamfile | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/tests/add-ons/kernel/file_systems/bfs/bfs_shell/Jamfile b/src/tests/add-ons/kernel/file_systems/bfs/bfs_shell/Jamfile index 87c7a20a44..00e472d958 100644 --- a/src/tests/add-ons/kernel/file_systems/bfs/bfs_shell/Jamfile +++ b/src/tests/add-ons/kernel/file_systems/bfs/bfs_shell/Jamfile @@ -3,10 +3,20 @@ SubDir OBOS_TOP src tests add-ons kernel file_systems bfs bfs_shell ; SubDirHdrs $(OBOS_TOP) src tests add-ons kernel file_systems fs_shell ; SubDirHdrs $(OBOS_TOP) src add-ons kernel file_systems bfs ; + { - local defines = [ FDefines USER DEBUG ] ; # _NO_INLINE_ASM - SubDirCcFlags $(defines) -fno-exceptions -fno-rtti ; #-fcheck-memory-usage - SubDirC++Flags $(defines) -fno-exceptions -fno-rtti ; #-fcheck-memory-usage + # set MALLOC_DEBUG to something when doing tests against memory corruption + # (although this has the downside that "jam" is also debugged...) + local malloc_debug_defines ; + local malloc_debug_flags ; + if $(MALLOC_DEBUG) { + malloc_debug_defines = _NO_INLINE_ASM ; + malloc_debug_flags = -fcheck-memory-usage ; + } + + local defines = [ FDefines USER DEBUG $(malloc_debug_defines) ] ; + SubDirCcFlags $(defines) -fno-exceptions -fno-rtti $(malloc_debug_flags) ; + SubDirC++Flags $(defines) -fno-exceptions -fno-rtti $(malloc_debug_flags) ; } SimpleTest bfs_shell