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.
Change-Id: If72b1d42dd99eaaf11d3cb1232006ee0e2e411c3
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
%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} "