From 22d8142ce77fce18f87b1a0242f86bd198623d2f Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Thu, 6 Oct 2016 10:38:39 -0700 Subject: Disable ASAN when building lemon. If ASAN is enabled, use "-fno-sanitize=all" when building lemon. This keeps us from having to set ASAN_OPTIONS=detect_leaks=0 in the environment in order to build Wireshark. Change-Id: I36f6d1a4f913ecabaf188f4c2b59216c8430d81a Reviewed-on: https://code.wireshark.org/review/18098 Petri-Dish: Gerald Combs Reviewed-by: Peter Wu Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs --- configure.ac | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 5487dd96a3..a13be50156 100644 --- a/configure.ac +++ b/configure.ac @@ -784,7 +784,21 @@ AC_ARG_ENABLE(asan, # XXX shouldn't this also be added to LDFLAGS? AC_WIRESHARK_COMPILER_FLAGS_CHECK(-fsanitize=address) + # Disable ASAN for build-time tools, e.g. lemon + WS_CFLAGS_saved="$WS_CFLAGS" + WS_LDFLAGS_saved="$WS_LDFLAGS" + AC_WIRESHARK_COMPILER_FLAGS_CHECK(-fno-sanitize=all, C) + if test "x$can_add_to_cflags" = "xyes" + then + NO_SANITIZE_CFLAGS="-fno-sanitize=all" + NO_SANITIZE_LDFLAGS="-fno-sanitize=all" + fi + WS_CFLAGS="$WS_CFLAGS_saved" + WS_LDFLAGS="$WS_LDFLAGS_saved" + ]) +AC_SUBST(NO_SANITIZE_CFLAGS) +AC_SUBST(NO_SANITIZE_LDFLAGS) # Add check hf conflict.. # -- cgit v1.2.3