[Tizen] Support asan build option
authorSeoyeon Kim <seoyeon2.kim@samsung.com>
Tue, 27 Feb 2024 07:10:37 +0000 (16:10 +0900)
committerSeoyeon Kim <seoyeon2.kim@samsung.com>
Tue, 27 Feb 2024 07:10:43 +0000 (16:10 +0900)
This reverts commit 9fedd68f73e76e838ffbb7f891dc13a7a3f30294.

Change-Id: I3bcc0fcc182f365c1c7cc8e49b1f87dc09e4d075

packaging/dali-csharp-binder.spec

index 3283b2b..d3b387c 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}
@@ -232,6 +239,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