Commit fb1e559c authored by Dominik Charousset's avatar Dominik Charousset

Streamline sanitizer build option

parent f15bfccb
......@@ -313,10 +313,10 @@ else()
endif()
# enable address sanitizer if requested by the user
if(CAF_ENABLE_ADDRESS_SANITIZER AND NOT WIN32)
add_compile_options("-fsanitize=address"
if(CAF_SANITIZERS)
add_compile_options("-fsanitize=${CAF_SANITIZERS}"
"-fno-omit-frame-pointer")
list(APPEND CAF_EXTRA_LDFLAGS "-fsanitize=address")
list(APPEND CAF_EXTRA_LDFLAGS "-fsanitize=${CAF_SANITIZERS}")
endif()
# -pthread is ignored on MacOSX but required on other platforms
if(NOT APPLE AND NOT WIN32)
......
......@@ -76,17 +76,9 @@ Usage: $0 [OPTION]... [VAR=VALUE]...
- INFO
- DEBUG
- TRACE
--with-address-sanitizer build with address sanitizer if available
--with-asan alias for --with-address-sanitier
--enable-asan alias for --with-address-sanitier
--with-gcov build with gcov coverage enabled
--with-sanitizers=LIST build with this list of sanitizers enabled
--with-actor-profiler enables the (experimental) actor_profiler API
Convenience options:
--dev-mode sets --build-type=debug, --no-examples,
--no-tools, --with-runtime-checks,
--log-level=trace, and --enable-asan
Influential Environment Variables (only on first invocation):
CXX C++ compiler command
CXXFLAGS C++ compiler flags (overrides defaults)
......@@ -238,17 +230,8 @@ while [ $# -ne 0 ]; do
--with-runtime-checks)
append_cache_entry CAF_ENABLE_RUNTIME_CHECKS BOOL yes
;;
--with-address-sanitizer)
append_cache_entry CAF_ENABLE_ADDRESS_SANITIZER BOOL yes
;;
--with-asan)
append_cache_entry CAF_ENABLE_ADDRESS_SANITIZER BOOL yes
;;
--enable-asan)
append_cache_entry CAF_ENABLE_ADDRESS_SANITIZER BOOL yes
;;
--with-gcov)
append_cache_entry CAF_ENABLE_GCOV BOOL yes
--with-sanitizers=*)
append_cache_entry CAF_SANITIZERS STRING "$optarg"
;;
--with-actor-profiler)
append_cache_entry CAF_ENABLE_ACTOR_PROFILER BOOL yes
......@@ -373,14 +356,6 @@ while [ $# -ne 0 ]; do
append_cache_entry $var BOOL yes
done
;;
--dev-mode)
append_cache_entry CMAKE_BUILD_TYPE STRING Debug
append_cache_entry CAF_NO_EXAMPLES BOOL yes
append_cache_entry CAF_NO_TOOLS BOOL yes
append_cache_entry CAF_LOG_LEVEL STRING TRACE
append_cache_entry CAF_ENABLE_RUNTIME_CHECKS BOOL yes
append_cache_entry CAF_ENABLE_ADDRESS_SANITIZER BOOL yes
;;
*)
echo "Invalid option '$1'. Try $0 --help to see available options."
exit 1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment