[Tizen] Support asan build option
authoreverLEEst(SangHyeon Lee) <sh10233.lee@samsung.com>
Thu, 17 Apr 2025 06:11:50 +0000 (15:11 +0900)
committereverLEEst(SangHyeon Lee) <sh10233.lee@samsung.com>
Thu, 17 Apr 2025 06:11:50 +0000 (15:11 +0900)
This reverts commit e7d9d4ecfa8088ecdc92ca427858a25e7cd06545.

packaging/dali-csharp-binder.spec

index 8e2c5debd7bc6f1a38afda83f2c922a2c60e14b6..fea48609d7441d58752c264917aa0ff751f9d29f 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