From b820f7ad321f3cead500520abaf1ecc94e2d318e Mon Sep 17 00:00:00 2001 From: Alzim Date: Fri, 14 Aug 2020 14:04:33 +0300 Subject: [PATCH] Add clang for 2016.1 --- lld.spec | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/lld.spec b/lld.spec index 8c44cbf..04f98c5 100644 --- a/lld.spec +++ b/lld.spec @@ -2,12 +2,22 @@ %define libname %mklibname %{name} %{major} %define devname %mklibname %{name} -d +%if %{mdvver} <= 201610 +%bcond_without clang +%else +%bcond_with clang +%endif + +%if %{with clang} +%define debug_package %{nil} +%endif + %bcond_without git Summary: The LLVM Linker Name: lld Version: 10.0.1 -Release: 1 +Release: 2 Group: Development/Other License: NCSA Url: http://llvm.org @@ -17,6 +27,10 @@ Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{versio Source0: http://releases.llvm.org/%{version}/%{name}-%{version}.src.tar.xz %endif BuildRequires: cmake +%if %{with clang} +BuildRequires: clang +BuildRequires: libcxx-devel +%endif BuildRequires: llvm-devel = %{version} BuildRequires: ncurses-devel BuildRequires: zlib-devel @@ -70,6 +84,11 @@ programs that use the LLD infrastructure. %setup -qn %{name}-%{version}.src %build +%if %{with clang} +%clang_gcc_wrapper +export CC=clang +export CXX=clang++ +%endif %cmake \ -DLLVM_LINK_LLVM_DYLIB:BOOL=ON \ -DLLVM_DYLIB_COMPONENTS="all" \