[Tizen] Support asan build option
[platform/core/uifw/dali-adaptor.git] / packaging / dali-adaptor.spec
index 132c3f6..03591d3 100644 (file)
@@ -17,7 +17,7 @@
 
 Name:       dali2-adaptor
 Summary:    The DALi Tizen Adaptor
-Version:    2.2.44
+Version:    2.3.8
 Release:    1
 Group:      System/Libraries
 License:    Apache-2.0 and BSD-3-Clause and MIT
@@ -117,6 +117,13 @@ BuildRequires:  pkgconfig(component-based-core-base)
 BuildRequires:  pkgconfig(thorvg)
 %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}
@@ -287,6 +294,17 @@ cmake_flags+=" -DENABLE_ECORE_WAYLAND2=ON"
 CXXFLAGS+=" -DOVER_TIZEN_VERSION_7"
 %endif
 
+# Use this conditional when Tizen version is 8.x or greater
+%if 0%{?tizen_version_major} >= 8
+CXXFLAGS+=" -DOVER_TIZEN_VERSION_8"
+%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