[Tizen] Support asan build option
authorWoochan Lee <wc0917.lee@samsung.com>
Tue, 7 Jan 2025 07:06:16 +0000 (16:06 +0900)
committerWoochan Lee <wc0917.lee@samsung.com>
Tue, 7 Jan 2025 07:06:16 +0000 (16:06 +0900)
This reverts commit 92e268821dab27a861e87ad3f94bb36f5226b09c.

packaging/dali-csharp-binder.spec

index 9cef039133735ddbfde1ccef2a14c9f183708476..88024c33cf865bd73966a071cbca2be9d5a9cda6 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