[Tizen] Support asan build option 66/301166/3
authorseungho baek <sbsh.baek@samsung.com>
Fri, 10 Nov 2023 04:18:20 +0000 (13:18 +0900)
committerseungho baek <sbsh.baek@samsung.com>
Fri, 10 Nov 2023 07:22:12 +0000 (16:22 +0900)
Change-Id: I3be03f02b890b1cd7bdaa3b6d53ce6dbd27dffbf
Signed-off-by: seungho baek <sbsh.baek@samsung.com>
packaging/dali-toolkit.spec

index ea0f852..03cca08 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