summaryrefslogtreecommitdiff
path: root/configurecompiler.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'configurecompiler.cmake')
-rw-r--r--configurecompiler.cmake11
1 files changed, 11 insertions, 0 deletions
diff --git a/configurecompiler.cmake b/configurecompiler.cmake
index 803e6e4..016114e 100644
--- a/configurecompiler.cmake
+++ b/configurecompiler.cmake
@@ -277,6 +277,17 @@ elseif (CLR_CMAKE_PLATFORM_UNIX)
message(FATAL_ERROR "Unknown build type! Set CMAKE_BUILD_TYPE to DEBUG, CHECKED, RELEASE, or RELWITHDEBINFO!")
endif ()
+ if(DEFINED ENV{TIZEN_ASAN_ENVIRONMENT})
+ if (CLR_CMAKE_PLATFORM_UNIX_ARM OR CLR_CMAKE_PLATFORM_UNIX_AMD64)
+ message(STATUS "TIZEN_ASAN_ENVIRONMENT is enabled.")
+ # add definitions to enable ASan support for only external libraries (supported only Tizen)
+ add_definitions(-DTIZEN_ASAN_ENVIRONMENT -DHAS_ADDRESS_SANITIZER)
+ set(TIZEN_ASAN_ENVIRONMENT 1)
+ else()
+ message(STATUS "TIZEN_ASAN_ENVIRONMENT cannot be enabled. Current arch is not supported.")
+ endif()
+ endif()
+
# set the CLANG sanitizer flags for debug build
if(UPPERCASE_CMAKE_BUILD_TYPE STREQUAL DEBUG OR UPPERCASE_CMAKE_BUILD_TYPE STREQUAL CHECKED)
# obtain settings from running enablesanitizers.sh