diff --git a/packaging/rhel/xrootd.spec.in b/packaging/rhel/xrootd.spec.in index 1d7bb06fee4..2270daf8241 100644 --- a/packaging/rhel/xrootd.spec.in +++ b/packaging/rhel/xrootd.spec.in @@ -37,7 +37,7 @@ Name: xrootd Epoch: 1 Version: __VERSION__ -Release: __RELEASE__%{?dist}%{?_with_clang:.clang} +Release: __RELEASE__%{?dist}%{?_with_clang:.clang}%{?_with_asan:.asan} Summary: Extended ROOT file server Group: System Environment/Daemons License: LGPLv3+ @@ -99,6 +99,11 @@ BuildRequires: graphviz-gd BuildRequires: clang %endif +%if %{?_with_asan:1}%{!?_with_asan:0} +BuildRequires: libasan +Requires: libasan +%endif + Requires: %{name}-server%{?_isa} = %{epoch}:%{version}-%{release} Requires: %{name}-selinux = %{epoch}:%{version}-%{release} @@ -389,6 +394,10 @@ export CC=clang export CXX=clang++ %endif +%if %{?_with_asan:1}%{!?_with_asan:0} +export CXXFLAGS='-fsanitize=address' +%endif + mkdir build pushd build cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=RelWithDebInfo \