diff options
author | Gerald Combs <gerald@wireshark.org> | 2016-10-06 10:38:39 -0700 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2016-10-07 17:54:35 +0000 |
commit | 22d8142ce77fce18f87b1a0242f86bd198623d2f (patch) | |
tree | e4a7c2ad2321ca0df24b2caf0391ca5696975934 /CMakeLists.txt | |
parent | 827ae0c722dc686da9980478a6ff3db723993ea5 (diff) |
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 <gerald@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 865e36f95b..667fee4bc7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -593,6 +593,12 @@ if(ENABLE_ASAN) endif() set(CMAKE_C_FLAGS "-fsanitize=address ${CMAKE_C_FLAGS}") set(CMAKE_CXX_FLAGS "-fsanitize=address ${CMAKE_CXX_FLAGS}") + # Disable ASAN for build-time tools, e.g. lemon + check_c_compiler_flag(-fno-sanitize=all C__fno_sanitize_all_VALID) + if(C__fno_sanitize_all_VALID) + set(NO_SANITIZE_CFLAGS "-fno-sanitize=all") + set(NO_SANITIZE_LDFLAGS "-fno-sanitize=all") + endif() endif() set(WERROR_COMMON_FLAGS "") |