[Tizen] Support asan build option
authorWoochan Lee <wc0917.lee@samsung.com>
Tue, 7 Jan 2025 06:55:46 +0000 (15:55 +0900)
committerWoochan Lee <wc0917.lee@samsung.com>
Tue, 7 Jan 2025 06:55:46 +0000 (15:55 +0900)
This reverts commit 2d66c07c6abef74a48d0a27a208a1b9e7fdaee04.

packaging/dali-adaptor.spec

index 1f929c3ea6dc8df76c553d39fa3cac636fc94693..dbbbae4c2ebca4e2d3210ab036945fc8fb435be1 100644 (file)
@@ -121,6 +121,13 @@ BuildRequires:  pkgconfig(component-based-core-base)
 
 BuildRequires:  pkgconfig(thorvg)
 
+# 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}
@@ -297,6 +304,12 @@ CXXFLAGS+=" -DOVER_TIZEN_VERSION_8"
 CXXFLAGS+=" -DOVER_TIZEN_VERSION_9"
 %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