[Tizen] Support asan build option
authorEverLEEst(SangHyeon Lee) <sh10233.lee@samsung.com>
Wed, 20 Mar 2024 10:44:29 +0000 (19:44 +0900)
committerEverLEEst(SangHyeon Lee) <sh10233.lee@samsung.com>
Wed, 20 Mar 2024 10:44:29 +0000 (19:44 +0900)
This reverts commit 7bf98806c05701f32ee7c79bf82917121d66539e.

packaging/dali-csharp-binder.spec

index 98e5a3b00e50eaff150a27d34b645783cb84161f..e863c1a6883122a4f6eca1e96e3ace7b8b8e7c0f 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}
@@ -232,6 +239,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