[Tizen] Support asan build option accepted/tizen/unified/20240221.062929 accepted/tizen/unified/x/20240222.211056
authorWoochan Lee <wc0917.lee@samsung.com>
Tue, 20 Feb 2024 07:17:27 +0000 (16:17 +0900)
committerWoochan Lee <wc0917.lee@samsung.com>
Tue, 20 Feb 2024 07:17:27 +0000 (16:17 +0900)
This reverts commit 7187ccef4787585e6b1d6c37957299f51b8c7388.

packaging/dali-extension.spec

index 24036e5..43c3232 100755 (executable)
@@ -58,6 +58,13 @@ BuildRequires:  pkgconfig(evas)
 BuildRequires:  pkgconfig(rive_tizen)
 %endif
 
+# For ASAN test
+%if "%{vd_asan}" == "1" || "%{asan}" == "1"
+BuildRequires: asan-force-options
+BuildRequires: asan-build-env
+BuildRequires: libasan
+%endif
+
 %description
 dali-extension
 
@@ -237,6 +244,12 @@ CFLAGS+=" -DOS_TIZEN_TV"
 CXXFLAGS+=" -DOS_TIZEN_TV"
 %endif
 
+%if "%{vd_asan}" == "1" || "%{asan}" == "1"
+CFLAGS+=" -fsanitize=address"
+CXXFLAGS+=" -fsanitize=address"
+LDFLAGS+=" -fsanitize=address"
+%endif
+
 libtoolize --force
 cd %{_builddir}/%{name}-%{version}/build/tizen
 autoreconf --install