This commit is contained in:
Sergey Zhemoytel 2022-11-02 22:40:30 +03:00
parent cfcf180b62
commit 28221ceb34

View file

@ -1,16 +1,18 @@
%global optflags %(echo %{optflags} | sed -e 's/-ffat-lto-objects//g' -e 's/-fvar-tracking-assignments//g' -e 's/-Wa,--compress-debug-sections//g' -e 's/\-nostdinc++//g' )
%define major %(echo %version |cut -d. -f1) %define major %(echo %version |cut -d. -f1)
%define libname %mklibname %{name} %{major} %define libname %mklibname %{name} %{major}
%define devname %mklibname %{name} -d %define devname %mklibname %{name} -d
%if %{mdvver} <= 201610 #if %{mdvver} <= 201610
%bcond_without clang #bcond_without clang
%else #else
%bcond_with clang #bcond_with clang
%endif #endif
%if %{with clang} #if %{with clang}
%define debug_package %{nil} #define debug_package %{nil}
%endif #endif
%bcond_without git %bcond_without git
@ -20,7 +22,7 @@ Version: 12.0.1
Release: 1 Release: 1
Group: Development/Other Group: Development/Other
License: NCSA License: NCSA
Url: http://llvm.org URL: http://llvm.org
%if %{with git} %if %{with git}
Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/%{name}-%{version}.src.tar.xz Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/%{name}-%{version}.src.tar.xz
%else %else
@ -28,10 +30,10 @@ Source0: http://releases.llvm.org/%{version}/%{name}-%{version}.src.tar.xz
%endif %endif
Source1: https://raw.githubusercontent.com/llvm/llvm-project/llvmorg-%{version}/libunwind/include/mach-o/compact_unwind_encoding.h Source1: https://raw.githubusercontent.com/llvm/llvm-project/llvmorg-%{version}/libunwind/include/mach-o/compact_unwind_encoding.h
BuildRequires: cmake BuildRequires: cmake
%if %{with clang} #if %{with clang}
BuildRequires: clang BuildRequires: clang
BuildRequires: libcxx-devel BuildRequires: libcxx-devel
%endif #endif
BuildRequires: llvm-devel = %{version} BuildRequires: llvm-devel = %{version}
BuildRequires: ncurses-devel BuildRequires: ncurses-devel
BuildRequires: zlib-devel BuildRequires: zlib-devel
@ -91,11 +93,11 @@ mkdir include/mach-o
cp %{S:1} include/mach-o cp %{S:1} include/mach-o
%build %build
%if %{with clang} #if %{with clang}
%clang_gcc_wrapper %clang_gcc_wrapper
export CC=clang #export CC=clang
export CXX=clang++ #export CXX=clang++
%endif #endif
%cmake \ %cmake \
-DLLVM_LINK_LLVM_DYLIB:BOOL=ON \ -DLLVM_LINK_LLVM_DYLIB:BOOL=ON \