[Tizen] Support asan build option
authorjoogab.yun <joogab.yun@samsung.com>
Tue, 10 Dec 2024 06:20:00 +0000 (15:20 +0900)
committerjoogab.yun <joogab.yun@samsung.com>
Tue, 10 Dec 2024 06:20:03 +0000 (15:20 +0900)
This reverts commit f4c5bbadb0b1d16450b9e8023ec6a6f044b422e4.

Change-Id: I5906296ce14c40efc2ca60b158f15e48c523348b

packaging/dali-csharp-binder.spec

index a08012a6e4eef5de11ad12be557ade2240027156..995a844f266f418fa1d22cb6040aeced15b15822 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