[Tizen] Support asan build option
authorHosang Kim <hosang12.kim@samsung.com>
Wed, 5 Mar 2025 09:28:26 +0000 (18:28 +0900)
committerHosang Kim <hosang12.kim@samsung.com>
Wed, 5 Mar 2025 09:28:26 +0000 (18:28 +0900)
This reverts commit a2c298863405081592b4a125dde3e1209b8ad53f.

Change-Id: I79029a246654656be5e86a8e9d66236710bbcc05

packaging/dali-csharp-binder.spec

index 561c943dcd9fc11b9968ab9bd753b67e2849e31e..c641154cb7d94286f73cc8896b64b215435d9cf1 100644 (file)
@@ -61,6 +61,13 @@ BuildRequires: pkgconfig(watch_viewer_dali)
 BuildRequires: pkgconfig(watch-holder-base)
 BuildRequires: pkgconfig(ecore-wl2)
 
+# 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}
@@ -226,6 +233,12 @@ CXXFLAGS+=" -DOVER_TIZEN_VERSION_7"
 
 %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