[Tizen] Support asan build option accepted/tizen/unified/20240520.131911 accepted/tizen/unified/x/20240521.022222
authorEunki, Hong <eunkiki.hong@samsung.com>
Mon, 20 May 2024 05:22:25 +0000 (14:22 +0900)
committerEunki, Hong <eunkiki.hong@samsung.com>
Mon, 20 May 2024 05:22:28 +0000 (14:22 +0900)
This reverts commit 1ff1eda24a9dceed04fe7af1ea59b2327ea38ffd.

Change-Id: Ic471821d06869084cfd8d3ce18729f7ef03cbc78

packaging/dali-extension.spec

index 2573898..2812161 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