Hello community,

here is the log from the commit of package llvm5 for openSUSE:Factory checked 
in at 2018-01-26 13:57:54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/llvm5 (Old)
 and      /work/SRC/openSUSE:Factory/.llvm5.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "llvm5"

Fri Jan 26 13:57:54 2018 rev:5 rq:569073 version:5.0.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/llvm5/llvm5.changes      2018-01-16 
09:34:17.544373868 +0100
+++ /work/SRC/openSUSE:Factory/.llvm5.new/llvm5.changes 2018-01-26 
13:57:55.829655298 +0100
@@ -1,0 +2,8 @@
+Thu Jan 18 15:23:59 UTC 2018 - m...@suse.com
+
+- 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:
------------------
++++++ llvm5.spec ++++++
--- /var/tmp/diff_new_pack.DF4WK9/_old  2018-01-26 13:58:01.513389929 +0100
+++ /var/tmp/diff_new_pack.DF4WK9/_new  2018-01-26 13:58:01.521389555 +0100
@@ -96,6 +96,7 @@
 Patch13:        llvm-normally-versioned-libllvm.patch
 Patch14:        llvm-do-not-install-static-libraries.patch
 Patch15:        opt-viewer-Do-not-require-python-2.patch
+Patch16:        n_clang_allow_BUILD_SHARED_LIBRARY.patch
 BuildRequires:  binutils-devel >= 2.21.90
 BuildRequires:  binutils-gold
 BuildRequires:  cmake
@@ -261,17 +262,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
@@ -515,6 +505,7 @@
 %patch13 -p1
 %patch14 -p1
 %patch15 -p1
+%patch16 -p1
 
 pushd cfe-%{version}.src
 %patch1 -p1
@@ -670,6 +661,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" \
@@ -1439,6 +1431,7 @@
 %files -n libclang%{_sonum}
 %defattr(-,root,root,-)
 %{_libdir}/libclang*.so.*
+%{_libdir}/libfindAllSymbols.so.*
 
 %files -n libLTO%{_sonum}
 %defattr(-,root,root)
@@ -1488,7 +1481,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
@@ -1496,18 +1488,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-5.0.1.src/cfe-5.0.1.src/CMakeLists.txt
===================================================================
--- llvm-5.0.1.src.orig/cfe-5.0.1.src/CMakeLists.txt
+++ llvm-5.0.1.src/cfe-5.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 )

Reply via email to