[Tizen] Support asan build option
authorWoochan Lee <wc0917.lee@samsung.com>
Wed, 7 Aug 2024 05:15:27 +0000 (14:15 +0900)
committerWoochan Lee <wc0917.lee@samsung.com>
Wed, 7 Aug 2024 05:15:27 +0000 (14:15 +0900)
This reverts commit 20b97857a60280be831202ae5a333ef42858ca2f.

packaging/dali-toolkit.spec

index acc6cdd..47878fb 100644 (file)
@@ -21,6 +21,13 @@ BuildRequires:  pkgconfig(egl)
 BuildRequires:  gettext
 BuildRequires:  pkgconfig(libtzplatform-config)
 
+# For ASAN test
+%if "%{vd_asan}" == "1" || "%{asan}" == "1"
+BuildRequires: asan-force-options
+BuildRequires: asan-build-env
+BuildRequires: libasan
+%endif
+
 #############################
 # profile setup
 #############################
@@ -203,6 +210,12 @@ LDFLAGS+=" --coverage "
 CXXFLAGS+=" -D_ARCH_ARM_"
 %endif
 
+%if "%{vd_asan}" == "1" || "%{asan}" == "1"
+CFLAGS+=" -fsanitize=address"
+CXXFLAGS+=" -fsanitize=address"
+LDFLAGS+=" -fsanitize=address"
+%endif
+
 libtoolize --force
 cd %{_builddir}/dali2-toolkit-%{version}/build/tizen