From 1c14f6a1722085f5788449ddb8a448e166e95fd4 Mon Sep 17 00:00:00 2001 From: ANZ1217 Date: Wed, 31 Jan 2024 16:07:38 +0900 Subject: [PATCH] [Tizen] Support asan build option This reverts commit da51c13bdcdbfc0595a0f260fd03a570bd137a75. --- packaging/dali.spec | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/packaging/dali.spec b/packaging/dali.spec index f60955d..6d47713 100644 --- a/packaging/dali.spec +++ b/packaging/dali.spec @@ -17,6 +17,13 @@ BuildRequires: gawk BuildRequires: pkgconfig(libtzplatform-config) %endif +# For ASAN test +%if "%{vd_asan}" == "1" || "%{asan}" == "1" +BuildRequires: asan-force-options +BuildRequires: asan-build-env +BuildRequires: libasan +%endif + %description DALi 3D Engine @@ -71,9 +78,18 @@ LDFLAGS+=" --coverage " libtoolize --force cd %{_builddir}/%{name}-%{version}/build/tizen -CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS; -CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS; -LDFLAGS="${LDFLAGS:-%optflags}" ; export LDFLAGS; +CFLAGS="${CFLAGS:-%optflags}" ; +CXXFLAGS="${CXXFLAGS:-%optflags}" ; +LDFLAGS="${LDFLAGS:-%optflags}" ; + +%if "%{vd_asan}" == "1" || "%{asan}" == "1" +CFLAGS+=" -fsanitize=address" +CXXFLAGS+=" -fsanitize=address" +LDFLAGS+=" -fsanitize=address" +%endif +export CFLAGS; +export CXXFLAGS; +export LDFLAGS; cmake \ %if 0%{?enable_debug} -- 2.7.4