[Tizen] Support asan build option
authorjmm <j0064423.lee@samsung.com>
Tue, 29 Apr 2025 05:20:01 +0000 (14:20 +0900)
committerjmm <j0064423.lee@samsung.com>
Tue, 29 Apr 2025 05:20:01 +0000 (14:20 +0900)
This reverts commit f9e35ce43c5ba7bf16a624bbae819468fefa321a.

packaging/dali-adaptor.spec

index b93b9c21abc4203272b2c21db010e23ac553fd0d..46c70f4e4ec6ee7c5c3c9d1b0aa912bae1df8696 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}
@@ -303,6 +310,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