[Tizen] Support asan build option accepted/tizen/unified/20231219.160402 accepted/tizen/unified/riscv/20231219.070932
authorjmm <j0064423.lee@samsung.com>
Mon, 18 Dec 2023 07:06:17 +0000 (16:06 +0900)
committerjmm <j0064423.lee@samsung.com>
Mon, 18 Dec 2023 07:06:21 +0000 (16:06 +0900)
This reverts commit 8901e9e355d4f1d3805ab30583a5d4d8ed3450a9.

Change-Id: Ib81d394078e2b94f8b9ae4873ae7f5792ed5bf02

packaging/dali-csharp-binder.spec

index 68d41ee..d3c0ffd 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