[Tizen] Support asan build option
authorjmm <j0064423.lee@samsung.com>
Tue, 2 Jul 2024 06:37:25 +0000 (15:37 +0900)
committerjmm <j0064423.lee@samsung.com>
Tue, 2 Jul 2024 06:37:30 +0000 (15:37 +0900)
This reverts commit ad92f92461309bd9dbab0704292d4e83feab0cc8.

Change-Id: I0450481d7d6d478e717db6effcba4bcd0578094e

packaging/dali-csharp-binder.spec

index 4da382bd16c1f42495799c52789bae5ec109a9a5..571f3a4b1da40dee9821592c6a1189af22d146da 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