!30 【WIP】【LLVM平行宇宙】Support build with clang

From: @luofeng14 
Reviewed-by: @wenwj0 
Signed-off-by: @wenwj0
This commit is contained in:
openeuler-ci-bot 2023-12-15 01:28:46 +00:00 committed by Gitee
commit 137c9786a3
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -12,7 +12,7 @@
%define _binaries_in_noarch_packages_terminate_build 0
Name: hadoop-3.1
Version: 3.1.4
Release: 6
Release: 7
Summary: A software platform for processing vast amounts of data
# The BSD license file is missing
# https://issues.apache.org/jira/browse/HADOOP-9849
@ -299,6 +299,12 @@ mvn install:install-file -DgroupId=orn.fusesource.hawtjni -DartifactId=hawtjni-r
%mvn_file :%{real_name}-common::tests: %{real_name}/%{real_name}-common
%build
if [[ "%{?toolchain}" == "clang" ]]
then
export CXXFLAGS="$CXXFLAGS -mcpu=generic+Crc -Wno-reserved-user-defined-literal"
export CFLAGS="$CFLAGS -mcpu=generic+Crc -Wno-reserved-user-defined-literal"
fi
mvn -Dsnappy.lib=/usr/lib64 -Dbundle.snappy -Dcontainer-executor.conf.dir=%{_sysconfdir}/%{real_name} -Pdist,native -DskipTests -DskipIT -Dmaven.javadoc.skip=true package
%install
@ -1114,6 +1120,9 @@ fi
%config(noreplace) %{_sysconfdir}/%{real_name}/container-executor.cfg
%changelog
* Wed Oct 11 2023 luofeng <luofeng13@huawei.com> - 3.1.4-7
- support clang build
* Fri Jul 21 2023 wenweijian <wenweijian2@huawei.com> - 3.1.4-6
- compatiable with gcc12