From fef1506c5afe488cfb4a7f0b462abe1d2985f530 Mon Sep 17 00:00:00 2001 From: Slava Barinov Date: Thu, 11 Jul 2019 16:25:46 +0300 Subject: [Tizen] Define -DHAS_ADDRESS_SANITIZER for ASan build This define turns on new and delete operators compatibility mode for build with Address Sanitizer. It allows Tizen libasan to intercept operators and prevents alloc-dealloc-mismatch errors. Signed-off-by: Slava Barinov --- packaging/coreclr.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packaging/coreclr.spec b/packaging/coreclr.spec index 78f274a9f2..326fa6dc52 100755 --- a/packaging/coreclr.spec +++ b/packaging/coreclr.spec @@ -146,9 +146,12 @@ done %build # disable asan build when global forced asan build -%{?asan:export ASAN_OPTIONS=use_sigaltstack=false:`cat /ASAN_OPTIONS`} -%{?asan:/usr/bin/gcc-unforce-options} -%{?asan:export LD_LIBRARY_PATH=`pwd`/libicu-57.1} +%{?asan: +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 " +} export CFLAGS=" --target=%{_host} " export CXXFLAGS=" --target=%{_host} " -- cgit v1.2.3