[Tizen] Support asan build option
authorEunki, Hong <eunkiki.hong@samsung.com>
Mon, 20 May 2024 05:24:04 +0000 (14:24 +0900)
committerEunki, Hong <eunkiki.hong@samsung.com>
Mon, 20 May 2024 05:24:09 +0000 (14:24 +0900)
This reverts commit 2cfea95ba9c302df3f439ac6bfb4f2bc5574c8e9.

Change-Id: I0fb07c793c8bb8b035287e995ff9975e901fbef1

packaging/dali-csharp-binder.spec

index c3a0aa56bc6591122b805dfedc5118c09b29e77d..5e609c59348b30b7d5cda27737fad03ddf664d68 100644 (file)
@@ -66,6 +66,13 @@ BuildRequires: pkgconfig(ecore-wl2)
 BuildRequires:  pkgconfig(ecore-wayland)
 %endif
 
+# For ASAN test
+%if "%{vd_asan}" == "1" || "%{asan}" == "1"
+BuildRequires: asan-force-options
+BuildRequires: asan-build-env
+BuildRequires: libasan
+%endif
+
 # for multiprofile
 Requires:   %{name}-compat = %{version}-%{release}
 Recommends: %{name}-profile_common = %{version}-%{release}
@@ -231,6 +238,12 @@ CXXFLAGS+=" -DOVER_TIZEN_VERSION_7"
 
 %endif
 
+%if "%{vd_asan}" == "1" || "%{asan}" == "1"
+CFLAGS+=" -fsanitize=address"
+CXXFLAGS+=" -fsanitize=address"
+LDFLAGS+=" -fsanitize=address"
+%endif
+
 %if 0%{?enable_debug}
 cmake_flags+=" -DCMAKE_BUILD_TYPE=Debug"
 %endif