[Tizen] Support asan build option
authorWoochan Lee <wc0917.lee@samsung.com>
Tue, 20 Feb 2024 07:21:40 +0000 (16:21 +0900)
committerWoochan Lee <wc0917.lee@samsung.com>
Tue, 20 Feb 2024 07:21:40 +0000 (16:21 +0900)
This reverts commit b8f82d47301d86ea5abcb62a8cea0bb5d10c72fa.

packaging/dali-csharp-binder.spec

index 01d31da..5b83035 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