[Tizen] Support asan build option accepted/tizen/unified/20240627.103714 accepted/tizen/unified/dev/20240701.072933 accepted/tizen/unified/x/20240628.014016
authorWonsik Jung <sidein@samsung.com>
Wed, 26 Jun 2024 04:34:32 +0000 (13:34 +0900)
committerWonsik Jung <sidein@samsung.com>
Wed, 26 Jun 2024 04:34:39 +0000 (13:34 +0900)
This reverts commit 45cf4da411980f52c74e55234750333bbfef4213.

packaging/dali-extension.spec

index 86ef62f..50d11f1 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