[Tizen] Support asan build option
authorSeoyeon Kim <seoyeon2.kim@samsung.com>
Tue, 13 Aug 2024 06:41:35 +0000 (15:41 +0900)
committerSeoyeon Kim <seoyeon2.kim@samsung.com>
Tue, 13 Aug 2024 06:41:38 +0000 (15:41 +0900)
This reverts commit 5603611129c41d4bbc26e9bae64d32257013d37c.

packaging/dali-csharp-binder.spec

index 6e7ee9ae9243435075e9e4aa464ada0d963f1373..bbc9e48d88fa52b95cfe0132b0dd1219f2775d62 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