[Tizen] Support asan build option
authorJaehyun Cho <jae_hyun.cho@samsung.com>
Tue, 27 Aug 2024 06:45:51 +0000 (15:45 +0900)
committerEunki, Hong <eunkiki.hong@samsung.com>
Thu, 10 Oct 2024 07:23:28 +0000 (16:23 +0900)
This reverts commit 065685204d05188cfea86b13496d1c7e54359c38.

packaging/dali-csharp-binder.spec

index eaebe62713ef3d1a7c8614cae02b5d3b82968e37..9a41f463180c878ef820f0f0c82cea1b2c9e9aa8 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