Conditional usage of clang. Enable it to test building on ABF.

This commit is contained in:
Mikhail Novosyolov 2019-01-30 00:59:39 +03:00
parent afeab52748
commit e6f2d94f95

View file

@ -31,6 +31,7 @@
%define sambaerrorsmajor 1
# Default options
%bcond_without clang
%bcond_with doc
%bcond_with cifs
%bcond_without ads
@ -100,7 +101,7 @@
Summary: Samba SMB server
Name: samba
Version: 4.9.4
Release: 5
Release: 6
Epoch: 1
License: GPLv3+
Group: System/Servers
@ -135,10 +136,13 @@ Patch9: DEBIAN-s3-auth-ignore-create_builtin_guests-failing-without.patch
Patch10: ROSA-vendor-version.patch
Patch11: ROSA-smb-default-config.patch
%if %{with clang}
BuildRequires: clang lld
%else
BuildRequires: gcc
%endif
# Required for ldb docs
BuildRequires: docbook-style-xsl
# For -fuse-ld
BuildRequires: gcc
BuildRequires: gnupg
BuildRequires: perl-Parse-Yapp
BuildRequires: python-tdb
@ -1476,6 +1480,12 @@ sed -e 's/@ROSA_VENDOR_PATCH@/%{release}/g' -i VERSION
%build
install -d -m 0755 %{buildroot}/%{_libdir}/samba
%if %{with clang}
export CC=clang
export CXX=clang++
export CPP=clang-cpp
%endif
export CFLAGS="-O2 -g"
chmod +x ./buildtools/bin/waf