[Tizen] Support asan build option
authorangler <jaws.lee@samsung.com>
Tue, 25 Mar 2025 03:24:54 +0000 (12:24 +0900)
committerangler <jaws.lee@samsung.com>
Tue, 25 Mar 2025 03:24:54 +0000 (12:24 +0900)
This reverts commit e7d9d4ecfa8088ecdc92ca427858a25e7cd06545.

packaging/dali-csharp-binder.spec

index 16515525cdf6978390b55e6a9d0b7a48c277fb44..ed78a23b7db16fda9361bfb613487d8186b2c0c3 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