[Tizen] Support asan build option
authorEunki, Hong <eunkiki.hong@samsung.com>
Tue, 14 Jan 2025 08:15:16 +0000 (17:15 +0900)
committerSeungho Baek <sbsh.baek@samsung.com>
Tue, 21 Jan 2025 11:34:23 +0000 (20:34 +0900)
This reverts commit f36c14574adc07e23e05978008c1db46650772b0.

Change-Id: I448815902d421c6dd62f774cc1293b71688aa012

packaging/dali-csharp-binder.spec

index e27c48bc85b949fdeeff2d2ee4ada5131a376f44..5317ecd3388af44a11123cd3fbdec1a5556baa2b 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