[Tizen] Support asan build option
authorhuiyu.eun <huiyu.eun@samsung.com>
Wed, 3 Apr 2024 06:11:13 +0000 (15:11 +0900)
committerhuiyu.eun <huiyu.eun@samsung.com>
Wed, 3 Apr 2024 06:11:16 +0000 (15:11 +0900)
This reverts commit 365c4c65ad983be48bcde700a13cda0ed57a4f23.

Change-Id: I743fb32f7d11e0958f31f176c12c521a5d5aaa15

packaging/dali-csharp-binder.spec

index 0b41bb1adb89450d59994f4145ef0f2d3b12bd66..4efc948cea555269c846f900cf2043198873e1ea 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