|
@@ -86,6 +86,10 @@ message(STATUS "Server statistics support - ${CIVETWEB_ENABLE_SERVER_STATS}")
|
|
option(CIVETWEB_ENABLE_MEMORY_DEBUGGING "Enable the memory debugging features" OFF)
|
|
option(CIVETWEB_ENABLE_MEMORY_DEBUGGING "Enable the memory debugging features" OFF)
|
|
message(STATUS "Memory Debugging - ${CIVETWEB_ENABLE_MEMORY_DEBUGGING}")
|
|
message(STATUS "Memory Debugging - ${CIVETWEB_ENABLE_MEMORY_DEBUGGING}")
|
|
|
|
|
|
|
|
+# ASAN in debug mode (-fsanitize=address, etc)
|
|
|
|
+option(CIVETWEB_ENABLE_ASAN "Enable ASAN in debug mode" ON)
|
|
|
|
+message(STATUS "ASAN in debug mode - ${CIVETWEB_ENABLE_ASAN}")
|
|
|
|
+
|
|
# LUA CGI support
|
|
# LUA CGI support
|
|
option(CIVETWEB_ENABLE_LUA "Enable Lua CGIs" OFF)
|
|
option(CIVETWEB_ENABLE_LUA "Enable Lua CGIs" OFF)
|
|
message(STATUS "Lua CGI support - ${CIVETWEB_ENABLE_LUA}")
|
|
message(STATUS "Lua CGI support - ${CIVETWEB_ENABLE_LUA}")
|
|
@@ -279,11 +283,13 @@ add_c_compiler_flag(-pedantic-errors)
|
|
add_c_compiler_flag(-fvisibility=hidden)
|
|
add_c_compiler_flag(-fvisibility=hidden)
|
|
add_c_compiler_flag(-fstack-protector-strong RELEASE)
|
|
add_c_compiler_flag(-fstack-protector-strong RELEASE)
|
|
add_c_compiler_flag(-flto RELEASE)
|
|
add_c_compiler_flag(-flto RELEASE)
|
|
|
|
+if (${CIVETWEB_ENABLE_ASAN})
|
|
add_c_compiler_flag(-fsanitize=undefined DEBUG)
|
|
add_c_compiler_flag(-fsanitize=undefined DEBUG)
|
|
add_c_compiler_flag(-fsanitize=address DEBUG)
|
|
add_c_compiler_flag(-fsanitize=address DEBUG)
|
|
if (HAVE_C_FLAG_FSANITIZE_ADDRESS)
|
|
if (HAVE_C_FLAG_FSANITIZE_ADDRESS)
|
|
add_c_compiler_flag(-static-asan DEBUG)
|
|
add_c_compiler_flag(-static-asan DEBUG)
|
|
endif()
|
|
endif()
|
|
|
|
+endif()
|
|
add_c_compiler_flag(-fstack-protector-all DEBUG)
|
|
add_c_compiler_flag(-fstack-protector-all DEBUG)
|
|
if (MINGW)
|
|
if (MINGW)
|
|
add_c_compiler_flag(-mwindows)
|
|
add_c_compiler_flag(-mwindows)
|