[Tizen] Support asan build option 65/301165/3
authorseungho baek <sbsh.baek@samsung.com>
Fri, 10 Nov 2023 04:18:08 +0000 (13:18 +0900)
committerseungho baek <sbsh.baek@samsung.com>
Fri, 10 Nov 2023 07:22:00 +0000 (16:22 +0900)
Change-Id: Icc2587e9716feb917ebc3d7ed7d6dc49f337b510
Signed-off-by: seungho baek <sbsh.baek@samsung.com>
packaging/dali-adaptor.spec

index 513c869..b16ce4a 100644 (file)
@@ -117,6 +117,13 @@ BuildRequires:  pkgconfig(component-based-core-base)
 BuildRequires:  pkgconfig(thorvg)
 %endif
 
+# For ASAN test
+%if "%{vd_asan}" == "1" || "%{asan}" == "1"
+BuildRequires: asan-force-options
+BuildRequires: asan-build-env
+BuildRequires: libasan
+%endif
+
 # for multiprofile
 Requires:   %{name}-compat = %{version}-%{release}
 Recommends: %{name}-profile_common = %{version}-%{release}
@@ -292,6 +299,12 @@ CXXFLAGS+=" -DOVER_TIZEN_VERSION_7"
 CXXFLAGS+=" -DOVER_TIZEN_VERSION_8"
 %endif
 
+%if "%{vd_asan}" == "1" || "%{asan}" == "1"
+CFLAGS+=" -fsanitize=address"
+CXXFLAGS+=" -fsanitize=address"
+LDFLAGS+=" -fsanitize=address"
+%endif
+
 %if 0%{?enable_debug}
 cmake_flags+=" -DCMAKE_BUILD_TYPE=Debug"
 %endif