SHA256
1
0
forked from pool/llvm

Accepting request 425075 from home:TheBlackCat:branches:devel:tools:compiler

Update to llvm 3.8.1
Many other fixes and cleanups

OBS-URL: https://build.opensuse.org/request/show/425075
OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm?expand=0&rev=467
This commit is contained in:
Ismail Dönmez
2016-09-07 06:46:04 +00:00
committed by Git OBS Bridge
parent dc80bb7862
commit f08dbfb441
39 changed files with 676 additions and 291 deletions

607
llvm.spec
View File

@@ -16,50 +16,53 @@
#
%define _revision 262553
%define _release_version 3.8.0
# Change this to 0 if this is not the latest version of LLVM
%define _latest 1
%define build_lldb 0
%define build_libcxx 0
%define build_openmp 0
%bcond_with ffi
%bcond_with oprofile
%bcond_with valgrind
%ifarch x86_64
%define build_libcxx 1
%define build_lldb 0
%endif
%if !0%{?is_opensuse} || !0%{_latest}
%bcond_with libcxx
%bcond_with openmp
%else
%ifarch ppc64 ppc64le %{ix86} x86_64
%define build_openmp 1
%endif
%ifarch x86_64
%bcond_without libcxx
%else
%bcond_with libcxx
%endif
%if !0%{?is_opensuse}
%define build_libcxx 0
%define build_lldb 0
%define build_openmp 0
%ifarch ppc64 ppc64le %{ix86} x86_64
%bcond_without openmp
%else
%bcond_with openmp
%endif
%endif
Name: llvm
Version: 3.8.0
Version: 3.8.1
Release: 0
%define _relver 3.8.1
%define _minor 3.8
%define _sonum 3_8
%define _socxx 1
%define _revsn 273405
Summary: Low Level Virtual Machine
License: NCSA
Group: Development/Languages/Other
Url: http://www.llvm.org
Source0: http://llvm.org/releases/%{version}/llvm-%{version}.src.tar.xz
Source1: http://llvm.org/releases/%{version}/cfe-%{version}.src.tar.xz
Source2: http://llvm.org/releases/%{version}/compiler-rt-%{version}.src.tar.xz
Source3: http://llvm.org/releases/%{version}/libcxx-%{version}.src.tar.xz
Source4: http://llvm.org/releases/%{version}/libcxxabi-%{version}.src.tar.xz
Source5: http://llvm.org/releases/%{version}/openmp-%{version}.src.tar.xz
# Manually created docs
# cd docs
# make -f Makefile.sphinx man html
# cd ..
# tar cvJf llvm-docs-3.8.0.src.tar.xz llvm-3.8.0.src/docs/_build/{man,html}
Source6: llvm-docs-%{version}.src.tar.xz
Source7: cfe-docs-%{version}.src.tar.xz
Source8: http://llvm.org/releases/%{version}/clang-tools-extra-%{version}.src.tar.xz
Source9: http://llvm.org/releases/%{version}/lldb-%{version}.src.tar.xz
Source2: http://llvm.org/releases/%{version}/clang-tools-extra-%{version}.src.tar.xz
Source3: http://llvm.org/releases/%{version}/compiler-rt-%{version}.src.tar.xz
Source4: http://llvm.org/releases/%{version}/libcxx-%{version}.src.tar.xz
Source5: http://llvm.org/releases/%{version}/libcxxabi-%{version}.src.tar.xz
Source6: http://llvm.org/releases/%{version}/openmp-%{version}.src.tar.xz
# Docs are created manually, see below
Source50: llvm-docs-%{version}.src.tar.xz
Source51: cfe-docs-%{version}.src.tar.xz
Source100: %{name}-rpmlintrc
Source101: baselibs.conf
# PATCH-FIX-OPENSUSE set-revision.patch idoenmez@suse.de -- Allow us to set revision
@@ -74,10 +77,9 @@ Patch5: clang-resourcedirs.patch
Patch6: llvm-remove-clang-only-flags.patch
Patch7: llvm-fix-find-gcc5-install.patch
Patch8: revert-cmake-soname.patch
Patch9: lldb-cmake.patch
Patch10: glibc-2.23-libcxx.patch
Patch11: glibc-2.24-libcxx.patch
Patch12: llvm-nonvoid-return.patch
Patch9: llvm-nonvoid-return.patch
Patch20: glibc-2.23-libcxx.patch
Patch21: glibc-2.24-libcxx.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: binutils-devel >= 2.21.90
BuildRequires: bison
@@ -87,7 +89,6 @@ BuildRequires: flex
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: groff
BuildRequires: libedit-devel
BuildRequires: libstdc++-devel
BuildRequires: libtool
BuildRequires: ncurses-devel
@@ -95,6 +96,18 @@ BuildRequires: ninja
BuildRequires: procps
BuildRequires: python-base
BuildRequires: python-xml
BuildRequires: pkgconfig(libedit)
%if %{with ffi}
BuildRequires: pkgconfig(libffi)
%endif
%if %{with valgrind}
BuildRequires: pkgconfig(valgrind)
%endif
%if %{with oprofile}
BuildRequires: oprofile-devel
%endif
# Avoid multiple provider errors
Requires: libLLVM%{_sonum}
# llvm does not work on ppc or s390
ExcludeArch: ppc s390
@@ -106,82 +119,230 @@ arbitrary programming languages.
The compiler infrastructure includes mirror sets of programming
tools as well as libraries with equivalent functionality.
%package -n libLLVM
%package -n libLLVM%{_sonum}
Summary: Libraries for LLVM
Group: Development/Libraries/C and C++
%description -n libLLVM
%description -n libLLVM%{_sonum}
This package contains the shared libraries needed for LLVM.
%package devel
Summary: Header Files for LLVM
Group: Development/Languages/Other
Conflicts: otherproviders(cmake(LLVM))
Requires: %{name} = %{version}
Requires: binutils-devel >= 2.21.90
Requires: bison
Requires: cmake
Requires: flex
Requires: groff
Requires: libstdc++-devel
Requires: libtool
Requires: ncurses-devel
Requires: pkgconfig(libedit)
%if %{with ffi}
Requires: pkgconfig(libffi)
%endif
%if %{with valgrind}
Requires: pkgconfig(valgrind)
%endif
%if %{with oprofile}
Requires: oprofile-devel
%endif
%description devel
This package contains library and header files needed to develop
new native programs that use the LLVM infrastructure.
%package clang
Summary: CLANG frontend for LLVM
Group: Development/Languages/Other
Requires: libstdc++-devel
Recommends: scan-build
Recommends: scan-view
Recommends: LLVMgold.so()(64bit)
%if %{with openmp} && %{_latest}
Recommends: libomp
%endif
# Avoid multiple provider errors
Requires: libLTO%{_sonum}
Requires: libc++%{_socxx}
Requires: libclang%{_sonum}
%description clang
This package contains the clang (C language) frontend for LLVM.
%package -n libclang
%package clang-checker
Summary: Static code analyzer for CLANG
Group: Development/Languages/Other
Provides: scan-build
Provides: scan-view
Conflicts: otherproviders(scan-build)
Conflicts: otherproviders(scan-view)
# Avoid multiple provider errors
Requires: libclang%{_sonum}
%description clang-checker
This package contains scan-build and scan-view, command line
static code analyzers for CLANG.
%package -n libclang%{_sonum}
Summary: Library files needed for clang
Group: Development/Libraries/C and C++
Requires: libstdc++-devel
# Avoid multiple provider errors
Requires: libLLVM%{_sonum}
%description -n libclang
%description -n libclang%{_sonum}
This package contains the shared libraries needed for clang.
%package clang-devel
Summary: CLANG frontend for LLVM (devel package)
Group: Development/Languages/Other
Conflicts: otherproviders(cmake(Clang))
Requires: llvm-clang = %{version}
Requires: llvm-devel = %{version}
Requires: cmake(LLVM) = %{version}
%description clang-devel
This package contains the clang (C language) frontend for LLVM.
(development files)
%package -n libLTO%{_sonum}
Summary: Link-time optimizer for LLVM
Group: Development/Languages/Other
# Avoid multiple provider errors
Requires: libLLVM%{_sonum}
%description -n libLTO%{_sonum}
This package contains the link-time optimizer for LLVM.
%package LTO-devel
Summary: Link-time optimizer for LLVM (devel package)
Group: Development/Languages/Other
Provides: libLTO.so
Conflicts: otherproviders(libLTO.so)
Requires: cmake(LLVM) = %{version}
# Avoid multiple provider errors
Requires: libLTO%{_sonum}
%description LTO-devel
This package contains the link-time optimizer for LLVM.
(development files)
%package gold
Summary: Gold linker plugin for LLVM
Group: Development/Languages/Other
Provides: LLVMgold.so()(64bit)
Conflicts: otherproviders(LLVMgold.so()(64bit))
# Avoid multiple provider errors
Requires: libLLVM%{_sonum}
Requires: cmake(LLVM) = %{version}
%description gold
This package contains the Gold linker plugin for LLVM.
%package -n libomp
Summary: MPI plugin for LLVM
Group: Development/Languages/Other
Provides: libomp.so()(64bit)
Conflicts: otherproviders(libomp.so()(64bit))
# Avoid multiple provider errors
Requires: libLLVM%{_sonum}
%description -n libomp
This package contains the OpenMP MPI plugin for LLVM.
%package -n libc++%{_socxx}
Summary: C++ standard library implementation
Group: Development/Libraries/C and C++
%description -n libc++%{_socxx}
This package contains libc++, a new implementation of the C++
standard library, targeting C++11.
%package libc++-devel
Summary: C++ standard library implementation (devel package)
Group: Development/Languages/C and C++
Provides: libc++.so
Conflicts: otherproviders(libc++.so)
%description libc++-devel
This package contains libc++, a new implementation of the C++
standard library, targeting C++11. (development files)
%package -n libc++abi%{_socxx}
Summary: C++ standard library ABI
Group: Development/Libraries/C and C++
%description -n libc++abi%{_socxx}
This package contains the ABI for libc++, a new implementation
of the C++ standard library, targeting C++11.
%package libc++abi-devel
Summary: C++ standard library ABI (devel package)
Group: Development/Languages/C and C++
Provides: libc++abi.so
Conflicts: otherproviders(libc++abi.so)
# Avoid multiple provider errors
Requires: %{name}-libc++-devel
%description libc++abi-devel
This package contains the ABI for libc++, a new implementation
of the C++ standard library, targeting C++11.
(development files)
%package vim-plugins
Summary: Vim plugins for LLVM
Group: Productivity/Text/Editors
Provides: vim-plugin-llvm
Conflicts: otherproviders(vim-plugin-llvm)
Requires: vim
BuildArch: noarch
%description vim-plugins
This package contains vim plugins for LLVM like syntax highlighting.
%package emacs-plugins
Summary: Emacs plugins for LLVM
Group: Productivity/Text/Editors
Provides: emacs-llvm
Conflicts: otherproviders(emacs-llvm)
Requires: emacs
BuildArch: noarch
%description emacs-plugins
This package contains Emacs plugins for LLVM like syntax highlighting.
%package -n python-clang
Summary: Python bindings for libclang
Summary: Python 2 bindings for libclang
Group: Development/Languages/Python
Requires: libclang = %{version}
Requires: %{name}-clang-devel = %{version}
Requires: python
BuildArch: noarch
%description -n python-clang
This package contains the Python bindings to clang (C language) frontend for LLVM.
This package contains the Python 2.x bindings to clang (C language)
frontend for LLVM.
%if %{build_lldb}
%package -n lldb
Summary: Next generation high-performance debugger
Group: Development/Languages
# We don't want to provide an unstable lldb-devel package now.
# Reconsider later when it has a stable API.
Provides: lldb-devel = %{version}
Obsoletes: lldb-devel < %{version}
%description -n lldb
LLDB is a next generation, high-performance debugger. It is built as a set
of reusable components which highly leverage existing libraries in the
larger LLVM Project, such as the Clang expression parser and LLVM
disassembler.
%endif
%prep
%setup -q -a 1 -a 2 -a 3 -a 4 -a 5 -a 7 -a 8 -a 9 -b 6 -n %{name}-%{version}.src
%setup -q -a 1 -a 2 -a 3 -a 4 -a 5 -a 6 -b 50 -a 51 -n llvm-%{version}.src
%patch1
%patch2
%patch3
@@ -190,23 +351,22 @@ disassembler.
%patch6 -p1
%patch7
%patch8 -p1
%patch9
%patch9 -p1
%if 0%{?suse_version} > 1320
%patch10
%patch11
%patch20
%patch21
%endif
%patch12 -p1
# Move into right place
mv cfe-%{version}.src tools/clang
mv compiler-rt-%{version}.src projects/compiler-rt
mv clang-tools-extra-%{version}.src tools/clang/tools/extra
%if %{build_openmp}
%if %{with openmp}
mv openmp-%{version}.src projects/openmp
%endif
%if %{build_libcxx}
%if %{with libcxx}
mv libcxx-%{version}.src projects/libcxx
mv libcxxabi-%{version}.src projects/libcxxabi
@@ -214,20 +374,12 @@ rm projects/libcxx/test/std/localization/locale.categories/category.time/locale.
rm projects/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_monthname_wide.pass.cpp
%endif
%if %{build_lldb}
mv lldb-%{version}.src tools/lldb
%endif
# We hardcode i586
rm tools/clang/test/Driver/x86_features.c
rm tools/clang/test/Driver/nacl-direct.c
sed -i s,SVN_REVISION,\"%{_revision}\",g tools/clang/lib/Basic/Version.cpp
sed -i s,LLVM_REVISION,\"%{_revision}\",g tools/clang/lib/Basic/Version.cpp
%if %{build_lldb}
sed -i s,LLDB_REVISION,\"%{_revision}\",g tools/lldb/source/lldb.cpp
%endif
sed -i s,SVN_REVISION,\"%{_revsn}\",g tools/clang/lib/Basic/Version.cpp
sed -i s,LLVM_REVISION,\"%{_revsn}\",g tools/clang/lib/Basic/Version.cpp
# ARMv6 needs this exact host triple
%ifarch armv6hl
@@ -238,8 +390,8 @@ EOF
%endif
%build
# Disable c/xx/flags as the clang fails to build with hardening right now
#flags="%{optflags} -fno-strict-aliasing"
# Disable c/xx/flags as the clang fails to build with hardening right now
#flags="%%{optflags} -fno-strict-aliasing"
flags="-fno-strict-aliasing"
%ifarch armv6hl
flags+=" -mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp"
@@ -247,6 +399,12 @@ flags+=" -mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp"
%ifarch armv7hl
flags+=" -mfloat-abi=hard -march=armv7-a -mtune=cortex-a9 -mfpu=vfpv3-d16"
%endif
%ifarch %{ix86} x86_64
TARGETS_TO_BUILD="all"
%else
TARGETS_TO_BUILD=host
%endif
# do not eat all memory
ninjaproc="%{?jobs:%{jobs}}"
echo "Available memory:"
@@ -289,68 +447,65 @@ export CXX=${PWD}/stage1/bin/clang++
-DLLVM_ENABLE_ASSERTIONS=OFF \
-DLLVM_ENABLE_PIC=ON \
-DLLVM_BINUTILS_INCDIR=/usr/include \
%ifarch %{ix86} x86_64
-DLLVM_TARGETS_TO_BUILD="all" \
%else
-DLLVM_TARGETS_TO_BUILD=host \
%endif
-DLLVM_TARGETS_TO_BUILD=${TARGETS_TO_BUILD} \
%if "%{_lib}" == "lib64"
-DLLVM_LIBDIR_SUFFIX=64 \
%endif
%if %{build_lldb}
-DLLDB_DISABLE_PYTHON=ON \
%if %{with ffi}
-DLLVM_ENABLE_FFI=ON \
%endif
%if %{with oprofile}
-DLLVM_USE_OPROFILE=ON \
%endif
-DCMAKE_SKIP_RPATH:BOOL=OFF \
-DCMAKE_EXE_LINKER_FLAGS="-Wl,--as-needed" \
-DCMAKE_MODULE_LINKER_FLAGS="-Wl,--as-needed" \
-DCMAKE_SHARED_LINKER_FLAGS="-Wl,--as-needed"
ninja -v -j $ninjaproc
%check
cd build
%ifnarch armv7hl armv7l
%if 0%{!?qemu_user_space_build:1}
# we just do not have enough memory with qemu emulation
ninja -v %{?_smp_mflags} check
ninja -v %{?_smp_mflags} clang-test
%if %{build_libcxx}
ninja -v %{?_smp_mflags} check-libcxx
ninja -v %{?_smp_mflags} check-libcxxabi
%endif
%endif
%endif
cd ..
%install
%cmake_install
# Build man/html pages
cd docs
# Docs are prebuilt due to sphinx dependency
#make -f Makefile.sphinx html man
rm -rf %{buildroot}/usr/docs
# Docs are prebuilt due to sphinx dependency
#
# pushd llvm-3.8.1.src/docs
# make -f Makefile.sphinx man html
# popd
# pushd cfe-3.8.1.src/docs
# make -f Makefile.sphinx man html
# popd
# tar cvJf llvm-docs-3.8.1.src.tar.xz llvm-3.8.1.src/docs/_build/{man,html}
# tar cvJf cfe-docs-3.8.1.src.tar.xz cfe-3.8.1.src/docs/_build/{man,html}
# Build man/html pages
pushd docs
rm -rf %{buildroot}/usr/docs
mkdir -p %{buildroot}%{_docdir}/llvm/html
mkdir -p %{buildroot}/usr/share/man/man1
cp -r _build/man/* %{buildroot}/usr/share/man/man1
cp -r _build/html/* %{buildroot}%{_docdir}/llvm/html
popd
cd ../tools/clang/docs
pushd tools/clang/docs
mkdir -p %{buildroot}%{_docdir}/llvm-clang/html
cp -r _build/man/* %{buildroot}/usr/share/man/man1
cp -r _build/html/* %{buildroot}%{_docdir}/llvm-clang/html
cd ../../..
popd
# install python bindings
install -d %{buildroot}%{py_sitedir}/clang
# The python bindings use the unversioned libclang.so,
# so it doesn't make sense to have multiple versions of it
%if %{_latest}
install -d %{buildroot}%{python_sitelib}/clang
pushd tools/clang/bindings/python
cp clang/*.py %{buildroot}%{py_sitedir}/clang
cp clang/*.py %{buildroot}%{python_sitelib}/clang
install -d %{buildroot}%{_docdir}/python-clang/examples/cindex
cp -r examples %{buildroot}%{_docdir}/python-clang
install -d %{buildroot}%{_docdir}/python-clang/tests/cindex/INPUTS
cp -r tests %{buildroot}%{_docdir}/python-clang
popd
%endif
mkdir -p %{buildroot}%{_libdir}/bfd-plugins
ln -s %{_libdir}/LLVMgold.so %{buildroot}%{_libdir}/bfd-plugins/
@@ -362,40 +517,102 @@ done
mv utils/vim/README utils/vim/README.vim
mv %{buildroot}%{_prefix}/libexec/{c++,ccc}-analyzer %{buildroot}%{_bindir}
mv %{buildroot}%{_datadir}/clang/clang-format-diff.py %{buildroot}%{_bindir}/clang-format-diff
mv %{buildroot}%{_datadir}/clang/clang-tidy-diff.py %{buildroot}%{_bindir}/clang-tidy-diff
mv %{buildroot}%{_datadir}/clang/run-clang-tidy.py %{buildroot}%{_bindir}/run-clang-tidy
chmod -x %{buildroot}%{_mandir}/man1/scan-build.1
# Stuff we don't want to include
rm %{buildroot}%{_mandir}/man1/lit.1
%if %{build_openmp}
# Put cmake files where they can be detected
mkdir -p %{buildroot}%{_libdir}/cmake/llvm/
pushd %{buildroot}%{_datadir}/llvm/cmake/
for f in * ; do
ln -s %{_datadir}/llvm/cmake/$f %{buildroot}%{_libdir}/cmake/llvm/$f
done
# This confuses the rpm cmake provides detection
rm %{buildroot}%{_libdir}/cmake/llvm/LLVM-Config.cmake
mkdir -p %{buildroot}%{_libdir}/cmake/clang/
pushd %{buildroot}%{_datadir}/clang/cmake/
for f in * ; do
ln -s %{_datadir}/clang/cmake/$f %{buildroot}%{_libdir}/cmake/clang/$f
done
%if %{with libcxx}
rm %{buildroot}%{_libdir}/libc++abi.a
%endif
%if %{with openmp}
rm %{buildroot}%{_libdir}/libgomp.so
rm %{buildroot}%{_libdir}/libiomp*.so
%endif
%if %{build_lldb}
rm %{buildroot}%{_libdir}/liblldb*.a
rm %{buildroot}%{_libdir}/liblldb.so
rm -r %{buildroot}%{_includedir}/lldb
%endif
# We don't care about applescript or sublime text
rm %{buildroot}%{_datadir}/clang/*.applescript
rm %{buildroot}%{_datadir}/clang/clang-format-sublime.py
%fdupes -s %{buildroot}%{_docdir}/%{name}
%fdupes -s %{buildroot}%{_docdir}/%{name}-doc
%post -n libLLVM -p /sbin/ldconfig
%postun -n libLLVM -p /sbin/ldconfig
%post clang -p /sbin/ldconfig
%postun clang -p /sbin/ldconfig
%check
cd build
%ifnarch armv7hl armv7l
%if !0%{?qemu_user_space_build:1}
# we just do not have enough memory with qemu emulation
%post -n libclang -p /sbin/ldconfig
%postun -n libclang -p /sbin/ldconfig
ninja -v %{?_smp_mflags} check
ninja -v %{?_smp_mflags} clang-test
%if %{with libcxx}
ninja -v %{?_smp_mflags} check-libcxx
ninja -v %{?_smp_mflags} check-libcxxabi
%endif
%endif
%endif
%post -n libLLVM%{_sonum} -p /sbin/ldconfig
%postun -n libLLVM%{_sonum} -p /sbin/ldconfig
%post -n libclang%{_sonum} -p /sbin/ldconfig
%postun -n libclang%{_sonum} -p /sbin/ldconfig
%post -n libLTO%{_sonum} -p /sbin/ldconfig
%postun -n libLTO%{_sonum} -p /sbin/ldconfig
%post gold -p /sbin/ldconfig
%postun gold -p /sbin/ldconfig
%post devel -p /sbin/ldconfig
%postun devel -p /sbin/ldconfig
%post clang-devel -p /sbin/ldconfig
%postun clang-devel -p /sbin/ldconfig
%if %{build_lldb}
%post -n lldb -p /sbin/ldconfig
%postun -n lldb -p /sbin/ldconfig
%post LTO-devel -p /sbin/ldconfig
%postun LTO-devel -p /sbin/ldconfig
%if %{with openmp}
%post -n libomp -p /sbin/ldconfig
%postun -n libomp -p /sbin/ldconfig
%endif
%if %{with libcxx}
%post -n libc++%{_socxx} -p /sbin/ldconfig
%postun -n libc++%{_socxx} -p /sbin/ldconfig
%post -n libc++abi%{_socxx} -p /sbin/ldconfig
%postun -n libc++abi%{_socxx} -p /sbin/ldconfig
%post libc++-devel -p /sbin/ldconfig
%postun libc++-devel -p /sbin/ldconfig
%post libc++abi-devel -p /sbin/ldconfig
%postun libc++abi-devel -p /sbin/ldconfig
%endif
%files
@@ -403,25 +620,21 @@ rm -r %{buildroot}%{_includedir}/lldb
%{_bindir}/bugpoint
%{_bindir}/llc
%{_bindir}/lli
%exclude %{_bindir}/llvm-config
%{_bindir}/llvm*
%{_bindir}/llvm-*
%{_bindir}/obj2yaml
%{_bindir}/opt
%{_bindir}/sancov
%{_bindir}/verify-uselistorder
%{_bindir}/yaml2obj
%exclude %{_mandir}/man1/llvm-config.1%{ext_man}
%{_mandir}/man1/FileCheck.1%{ext_man}
%{_mandir}/man1/bugpoint.1%{ext_man}
%{_mandir}/man1/tblgen.1%{ext_man}
%{_mandir}/man1/llc.1%{ext_man}
%{_mandir}/man1/lli.1%{ext_man}
%{_mandir}/man1/llvm*.1%{ext_man}
%{_mandir}/man1/FileCheck.1%{ext_man}
%{_mandir}/man1/llvm-*.1%{ext_man}
%{_mandir}/man1/opt.1%{ext_man}
%files -n libLLVM
%defattr(-,root,root,-)
%{_libdir}/libLLVM*.so.*
%{_mandir}/man1/tblgen.1%{ext_man}
%exclude %{_bindir}/llvm-config
%exclude %{_mandir}/man1/llvm-config.1%{ext_man}
%files clang
%defattr(-,root,root)
@@ -431,41 +644,64 @@ rm -r %{buildroot}%{_includedir}/lldb
%{_bindir}/clang
%{_bindir}/clang-*
%{_bindir}/clang++
%{_bindir}/clang-format
%{_bindir}/git-clang-format
%{_bindir}/modularize
%{_bindir}/run-clang-tidy
%{_mandir}/man1/clang.1%{ext_man}
%dir %{_libdir}/clang/
%{_libdir}/clang/%{_relver}/
%files clang-checker
%defattr(-,root,root)
%{_bindir}/scan-build
%{_bindir}/scan-view
%{_datadir}/clang
%{_datadir}/scan-build
%{_datadir}/scan-view
%{_mandir}/man1/clang.1%{ext_man}
%{_datadir}/scan-build/
%{_datadir}/scan-view/
%{_mandir}/man1/scan-build.1%{ext_man}
%{_libdir}/libLTO.*
%if %{build_openmp}
%{_libdir}/libomp.so
%endif
%if %{build_libcxx}
%{_libdir}/libc++*
%{_includedir}/c++/*
%endif
%{_libdir}/LLVMgold.so
%{_libdir}/bfd-plugins/
%{_libdir}/clang
%ifnarch s390x
%{_libdir}/clang/%{_release_version}/lib/linux/
%endif
%files -n libclang
%files -n libLLVM%{_sonum}
%defattr(-,root,root,-)
%{_libdir}/libLLVM*.so.*
%files -n libclang%{_sonum}
%defattr(-,root,root,-)
%{_libdir}/libclang*.so.*
%files clang-devel
%files -n libLTO%{_sonum}
%defattr(-,root,root)
%{_libdir}/libclang*.so
%{_includedir}/clang
%{_includedir}/clang-c
%doc %{_docdir}/llvm-clang
%{_libdir}/libLTO.so.*
%files gold
%defattr(-,root,root)
%{_libdir}/LLVMgold.so
%dir %{_libdir}/bfd-plugins/
%{_libdir}/bfd-plugins/LLVMgold.so
%if %{with openmp}
%files -n libomp
%defattr(-,root,root)
%{_libdir}/libomp.so
%endif
%if %{with libcxx}
%files -n libc++%{_socxx}
%defattr(-,root,root)
%{_libdir}/libc++.so.*
%files -n libc++abi%{_socxx}
%defattr(-,root,root)
%{_libdir}/libc++abi.so.*
%files libc++-devel
%defattr(-,root,root)
%{_libdir}/libc++.so
%{_libdir}/libc++abi.so
%{_includedir}/c++/
%files libc++abi-devel
%defattr(-,root,root)
%{_libdir}/libc++abi.so
%endif
%files devel
%defattr(-,root,root,-)
@@ -473,31 +709,50 @@ rm -r %{buildroot}%{_includedir}/lldb
%{_libdir}/libLLVM*.so
%{_libdir}/BugpointPasses.*
%{_libdir}/LLVMHello.*
%doc %{_mandir}/man1/llvm-config.1%{ext_man}
%{_includedir}/llvm/
%{_includedir}/llvm-c/
%dir %{_datadir}/llvm
%{_datadir}/llvm/cmake/
%doc %{_docdir}/llvm
%dir %{_datadir}/llvm/
%{_datadir}/llvm/cmake
%{_libdir}/cmake/llvm
%{_docdir}/llvm/
%{_mandir}/man1/llvm-config.1%{ext_man}
%files clang-devel
%defattr(-,root,root)
%{_libdir}/libclang*.so
%{_includedir}/clang/
%{_includedir}/clang-c/
%dir %{_datadir}/clang/
%{_datadir}/clang/cmake
%{_libdir}/cmake/clang
%{_docdir}/llvm-clang/
%files LTO-devel
%defattr(-,root,root)
%{_libdir}/libLTO.so
%files emacs-plugins
%defattr(-,root,root,-)
%dir %{_datadir}/clang/
%{_datadir}/clang/clang-format.el
%files vim-plugins
%defattr(-,root,root,-)
%doc utils/vim/README.vim
%{_datadir}/vim/
%dir %{_datadir}/clang/
%{_datadir}/clang/clang-format.py
# The python bindings use the unversioned libclang.so,
# so it doesn't make sense to have multiple versions of it
%if %{_latest}
%files -n python-clang
%defattr(-,root,root)
%{py_sitedir}/clang
%{py_sitedir}/clang/__init__.py
%{py_sitedir}/clang/cindex.py
%{py_sitedir}/clang/enumerations.py
%doc %{_docdir}/python-clang
%if %{build_lldb}
%files -n lldb
%defattr(-,root,root,-)
%{_libdir}/liblldb.so.*
%{_bindir}/lldb*
%{python_sitelib}/clang/
%{python_sitelib}/clang/__init__.py
%{python_sitelib}/clang/cindex.py
%{python_sitelib}/clang/enumerations.py
%{_docdir}/python-clang/
%endif
%changelog