[Tizen] Support asan build option
authorjoogab.yun <joogab.yun@samsung.com>
Tue, 23 Jul 2024 05:03:22 +0000 (14:03 +0900)
committerjoogab.yun <joogab.yun@samsung.com>
Tue, 23 Jul 2024 05:03:26 +0000 (14:03 +0900)
This reverts commit f6da98b7dccaa3cdf12d063cb25e268c0e124eea.

Change-Id: I958046b6f106de38e13d0842bd71c1fa3736438b

packaging/dali-csharp-binder.spec

index 546117d62d437de0c804e236e1beed9da3eee3a5..8a05d8761741027f08db0b245072b387eab90b61 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