summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVyacheslav Cherkashin <v.cherkashin@samsung.com>2019-07-19 12:05:47 (GMT)
committerDongkyun Son <dongkyun.s@samsung.com>2019-09-30 04:48:19 (GMT)
commit4c03000f41c61776c2192543323e5901867d033c (patch)
tree70631d164f6da12deac60f9ca409d65e24d79695
parent12a4ef6feaf2d1519d43931f84900650b1bc9c52 (diff)
downloadcoreclr-sandbox/dkson95/integrate-libasansi.zip
coreclr-sandbox/dkson95/integrate-libasansi.tar.gz
coreclr-sandbox/dkson95/integrate-libasansi.tar.bz2
[Tizen] Enable Tizen ASan runtime supportsandbox/dkson95/integrate-libasansi
Enable libasansi.so support (libasan.so with switchable interceptors). Change-Id: I9ee9b47b7beab55f036ffc0697ffab2583e9701c Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
-rw-r--r--configurecompiler.cmake11
-rwxr-xr-xpackaging/coreclr.spec4
2 files changed, 14 insertions, 1 deletions
diff --git a/configurecompiler.cmake b/configurecompiler.cmake
index eb817ef..423bb40 100644
--- a/configurecompiler.cmake
+++ b/configurecompiler.cmake
@@ -300,6 +300,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
diff --git a/packaging/coreclr.spec b/packaging/coreclr.spec
index 8d1d26f..fa8a5c3 100755
--- a/packaging/coreclr.spec
+++ b/packaging/coreclr.spec
@@ -148,7 +148,9 @@ done
export ASAN_OPTIONS=use_sigaltstack=false:`cat /ASAN_OPTIONS`
/usr/bin/gcc-unforce-options
export LD_LIBRARY_PATH=`pwd`/libicu-57.1
-export CPPFLAGS+=" -DHAS_ADDRESS_SANITIZER "
+
+# enable ASan support for only external libs
+export TIZEN_ASAN_ENVIRONMENT=1
}
export CFLAGS=" --target=%{_host} "