Commit fb1e559c authored by Dominik Charousset's avatar Dominik Charousset

Streamline sanitizer build option

parent f15bfccb
...@@ -313,10 +313,10 @@ else() ...@@ -313,10 +313,10 @@ else()
endif() endif()
# enable address sanitizer if requested by the user # enable address sanitizer if requested by the user
if(CAF_ENABLE_ADDRESS_SANITIZER AND NOT WIN32) if(CAF_SANITIZERS)
add_compile_options("-fsanitize=address" add_compile_options("-fsanitize=${CAF_SANITIZERS}"
"-fno-omit-frame-pointer") "-fno-omit-frame-pointer")
list(APPEND CAF_EXTRA_LDFLAGS "-fsanitize=address") list(APPEND CAF_EXTRA_LDFLAGS "-fsanitize=${CAF_SANITIZERS}")
endif() endif()
# -pthread is ignored on MacOSX but required on other platforms # -pthread is ignored on MacOSX but required on other platforms
if(NOT APPLE AND NOT WIN32) if(NOT APPLE AND NOT WIN32)
......
...@@ -76,17 +76,9 @@ Usage: $0 [OPTION]... [VAR=VALUE]... ...@@ -76,17 +76,9 @@ Usage: $0 [OPTION]... [VAR=VALUE]...
- INFO - INFO
- DEBUG - DEBUG
- TRACE - TRACE
--with-address-sanitizer build with address sanitizer if available --with-sanitizers=LIST build with this list of sanitizers enabled
--with-asan alias for --with-address-sanitier
--enable-asan alias for --with-address-sanitier
--with-gcov build with gcov coverage enabled
--with-actor-profiler enables the (experimental) actor_profiler API --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): Influential Environment Variables (only on first invocation):
CXX C++ compiler command CXX C++ compiler command
CXXFLAGS C++ compiler flags (overrides defaults) CXXFLAGS C++ compiler flags (overrides defaults)
...@@ -238,17 +230,8 @@ while [ $# -ne 0 ]; do ...@@ -238,17 +230,8 @@ while [ $# -ne 0 ]; do
--with-runtime-checks) --with-runtime-checks)
append_cache_entry CAF_ENABLE_RUNTIME_CHECKS BOOL yes append_cache_entry CAF_ENABLE_RUNTIME_CHECKS BOOL yes
;; ;;
--with-address-sanitizer) --with-sanitizers=*)
append_cache_entry CAF_ENABLE_ADDRESS_SANITIZER BOOL yes append_cache_entry CAF_SANITIZERS STRING "$optarg"
;;
--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-actor-profiler) --with-actor-profiler)
append_cache_entry CAF_ENABLE_ACTOR_PROFILER BOOL yes append_cache_entry CAF_ENABLE_ACTOR_PROFILER BOOL yes
...@@ -373,14 +356,6 @@ while [ $# -ne 0 ]; do ...@@ -373,14 +356,6 @@ while [ $# -ne 0 ]; do
append_cache_entry $var BOOL yes append_cache_entry $var BOOL yes
done 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." echo "Invalid option '$1'. Try $0 --help to see available options."
exit 1 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