Skip to content

Commit

Permalink
Merge pull request #704 from gbitzes/asan-rpm-packages
Browse files Browse the repository at this point in the history
[RPM] Enable generation of asan-instrumented RPMs
  • Loading branch information
simonmichal committed May 15, 2018
2 parents f06ecc6 + c19d6f5 commit 1ca65ea
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion packaging/rhel/xrootd.spec.in
Expand Up @@ -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+
Expand Down Expand Up @@ -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}

Expand Down Expand Up @@ -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 \
Expand Down

0 comments on commit 1ca65ea

Please sign in to comment.