[Tizen] Support asan build option
authorBowon Ryu <bowon.ryu@samsung.com>
Tue, 26 Nov 2024 06:10:16 +0000 (15:10 +0900)
committerBowon Ryu <bowon.ryu@samsung.com>
Tue, 26 Nov 2024 06:10:16 +0000 (15:10 +0900)
This reverts commit 08b82bfb29e0007468fef28e793b3b82520ee9ff.

packaging/dali-csharp-binder.spec

index 9267abea1f70107e55a7ca0001fc1b4947e0152a..124d66570c358c495f3528a94e02cf529c83081c 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