[Tizen] Support asan build option
authorEunki, Hong <eunkiki.hong@samsung.com>
Wed, 16 Oct 2024 06:53:05 +0000 (15:53 +0900)
committerEunki, Hong <eunkiki.hong@samsung.com>
Wed, 16 Oct 2024 06:53:13 +0000 (15:53 +0900)
This reverts commit 10700d8d9a61e5ffa4982f8e23c1429a13b10df2.

Change-Id: I4143058eb5c2d023a889e1c90f4105fb458f68e7

packaging/dali-adaptor.spec

index d138fa38cf0835d9ef55274e9551cf41245fb32f..9d3e0b71a8f562161618624f5dec12f6006f6a60 100644 (file)
@@ -118,6 +118,13 @@ BuildRequires:  pkgconfig(component-based-core-base)
 BuildRequires:  pkgconfig(thorvg)
 %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}
@@ -299,6 +306,12 @@ CXXFLAGS+=" -DOVER_TIZEN_VERSION_7"
 CXXFLAGS+=" -DOVER_TIZEN_VERSION_8"
 %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