[Tizen] Support asan build option
authorBowon Ryu <bowon.ryu@samsung.com>
Wed, 24 Jan 2024 05:44:17 +0000 (14:44 +0900)
committerBowon Ryu <bowon.ryu@samsung.com>
Wed, 24 Jan 2024 05:44:17 +0000 (14:44 +0900)
This reverts commit 6b2436da585c2210293213d9f38cf05fe324f4d5.

packaging/dali-csharp-binder.spec

index 6c35def..3ac3187 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