[Tizen] Support asan build option
authordongsug.song <dongsug.song@samsung.com>
Wed, 31 Jul 2024 00:42:29 +0000 (09:42 +0900)
committerdongsug.song <dongsug.song@samsung.com>
Wed, 31 Jul 2024 00:42:38 +0000 (09:42 +0900)
This reverts commit 085b7499d5edadeafe7d3f6a0d2f3721933a710f.

Change-Id: I26f0c3d3bab6286a4ee8fcde798e965f965036f6

packaging/dali-csharp-binder.spec

index bce0a51f3b4a79d393c3c804c96aed715fb45a28..252621a998b897912673ce25018e0896589230b7 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