[Tizen] Support asan build option
authorWoochan Lee <wc0917.lee@samsung.com>
Thu, 22 May 2025 04:45:39 +0000 (13:45 +0900)
committerWoochan Lee <wc0917.lee@samsung.com>
Thu, 22 May 2025 04:45:39 +0000 (13:45 +0900)
This reverts commit d75dba29e68bd0b765706cef621821102cdf4788.

packaging/dali-adaptor.spec

index df72561cf687ba54e70d2c29cf1e6dd89445a23c..a6a203858ae88d0f82c06bd15495b5ac48553426 100644 (file)
@@ -112,6 +112,13 @@ BuildRequires:  pkgconfig(component-based-core-base)
 
 BuildRequires:  pkgconfig(thorvg)
 
+# 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}
@@ -304,6 +311,12 @@ CXXFLAGS+=" -DOVER_TIZEN_VERSION_9"
 CXXFLAGS+=" -DOVER_TIZEN_VERSION_10"
 %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