[Tizen] Support asan build option
authorjykeon <jykeon@samsung.com>
Tue, 18 Jun 2024 08:57:01 +0000 (17:57 +0900)
committerjykeon <jykeon@samsung.com>
Tue, 18 Jun 2024 08:57:01 +0000 (17:57 +0900)
This reverts commit 3bb3ff3d51126c80d9fbfdb2fb1a17ceda2cc8a3.

packaging/dali-csharp-binder.spec

index 99c707531e1db6f52e03c80a9400c0bb7774f0e0..4e335f4a7e235d4bbf1495d12c4b769693906630 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