[Tizen] Support asan build option
authorsunghyun kim <scholb.kim@samsung.com>
Wed, 10 Jul 2024 07:26:48 +0000 (16:26 +0900)
committersunghyun kim <scholb.kim@samsung.com>
Wed, 10 Jul 2024 07:26:56 +0000 (16:26 +0900)
This reverts commit 61c065c4923f57568386f7cbec8607b0216eb349.

packaging/dali-csharp-binder.spec

index 0619c496be4bf1661bfa0855f94c05ff40e62277..73ee265dce4babd049cdd5c0c543c455f59c76e6 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