Hello community, here is the log from the commit of package llvm4 for openSUSE:Factory checked in at 2018-01-25 12:39:59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/llvm4 (Old) and /work/SRC/openSUSE:Factory/.llvm4.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "llvm4" Thu Jan 25 12:39:59 2018 rev:13 rq:569072 version:4.0.1 Changes: -------- --- /work/SRC/openSUSE:Factory/llvm4/llvm4.changes 2018-01-16 09:33:35.734330073 +0100 +++ /work/SRC/openSUSE:Factory/.llvm4.new/llvm4.changes 2018-01-25 12:40:03.676006217 +0100 @@ -1,0 +2,8 @@ +Thu Jan 18 15:23:59 UTC 2018 - [email protected] + +- n_clang_allow_BUILD_SHARED_LIBRARY.patch + * Allow buildling clang with BUILD_SHARED_LIBRARY while the rest + is built with LLVM_LINK_LLVM_DYLIB. (bnc#1065464) +- Remove clang-devel-static. + +------------------------------------------------------------------- New: ---- n_clang_allow_BUILD_SHARED_LIBRARY.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ llvm4.spec ++++++ --- /var/tmp/diff_new_pack.qRLtCn/_old 2018-01-25 12:40:06.779861311 +0100 +++ /var/tmp/diff_new_pack.qRLtCn/_new 2018-01-25 12:40:06.779861311 +0100 @@ -95,6 +95,7 @@ Patch22: llvm-lit-Make-util.executeCommand-python3-friendly.patch Patch23: llvm-lit-Re-apply-Fix-some-convoluted-logic-around-Unicod.patch Patch24: libcxx-fix-python3-syntax-error.patch +Patch25: n_clang_allow_BUILD_SHARED_LIBRARY.patch BuildRequires: binutils-devel >= 2.21.90 BuildRequires: binutils-gold BuildRequires: cmake @@ -260,17 +261,6 @@ This package contains the clang (C language) frontend for LLVM. (development files) -%package -n clang%{_sonum}-devel-static -Summary: Static libraries for CLANG -Group: Development/Languages/Other -Requires: clang%{_sonum}-devel = %{version} -Provides: clang-devel-static-provider -Conflicts: clang-devel-static-provider - -%description -n clang%{_sonum}-devel-static -This package contains static libraries for clang (C language) -frontend for LLVM. - %package -n libLTO%{_sonum} Summary: Link-time optimizer for LLVM # Avoid multiple provider errors @@ -506,6 +496,7 @@ %patch19 -p1 %patch22 -p1 %patch23 -p1 +%patch25 -p1 pushd cfe-%{version}.src %patch14 -p1 @@ -652,6 +643,7 @@ # -z,now is breaking now, it needs to be fixed %cmake \ -DBUILD_SHARED_LIBS:BOOL=OFF \ + -DCLANG_BUILD_SHARED_LIBS:BOOL=ON \ -DLLVM_BUILD_LLVM_DYLIB:BOOL=ON \ -DLLVM_LINK_LLVM_DYLIB:BOOL=ON \ -DCMAKE_C_FLAGS="$flags" \ @@ -1372,6 +1364,7 @@ %files -n libclang%{_sonum} %defattr(-,root,root,-) %{_libdir}/libclang*.so.* +%{_libdir}/libfindAllSymbols.so.* %files -n libLTO%{_sonum} %defattr(-,root,root) @@ -1421,7 +1414,6 @@ %{_includedir}/llvm/ %{_includedir}/llvm-c/ %{_libdir}/cmake/llvm -%exclude %{_libdir}/cmake/llvm/LLVMStaticExports*.cmake %{_docdir}/llvm/ %{_mandir}/man1/llvm-config.1%{ext_man} %config(noreplace) %{_sysconfdir}/rpm/macros.llvm @@ -1429,18 +1421,13 @@ %files -n clang%{_sonum}-devel %defattr(-,root,root) %{_libdir}/libclang*.so +%{_libdir}/libfindAllSymbols.so %{_includedir}/clang/ %{_includedir}/clang-c/ %{_libdir}/cmake/clang %exclude %{_libdir}/cmake/clang/ClangStaticTargets*.cmake %{_docdir}/llvm-clang/ -%files -n clang%{_sonum}-devel-static -%defattr(-,root,root,-) -%{_libdir}/libclang*.a -%{_libdir}/libfindAllSymbols.a -%{_libdir}/cmake/clang/ClangStaticTargets*.cmake - %files LTO-devel %defattr(-,root,root) %{_libdir}/libLTO.so ++++++ n_clang_allow_BUILD_SHARED_LIBRARY.patch ++++++ We use LLVM_BUILD_LLVM_DYLIB to build the llvm libraries as shared, but that does not work for clang. We can use BUILD_SHARED_LIBS on clang, but since we build them all together, we need to smuggle it in using this patch. Index: llvm-4.0.1.src/cfe-4.0.1.src/CMakeLists.txt =================================================================== --- llvm-4.0.1.src.orig/cfe-4.0.1.src/CMakeLists.txt +++ llvm-4.0.1.src/cfe-4.0.1.src/CMakeLists.txt @@ -1,5 +1,10 @@ cmake_minimum_required(VERSION 3.4.3) +if( CLANG_BUILD_SHARED_LIBS ) + set(BUILD_SHARED_LIBS ON) + set(LLVM_BUILD_LLVM_DYLIB OFF) +endif() + # If we are not building as a part of LLVM, build Clang as an # standalone project, using LLVM as an external library: if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
