Hello community,

here is the log from the commit of package llvm4 for openSUSE:Factory checked 
in at 2017-10-19 19:31:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/llvm4 (Old)
 and      /work/SRC/openSUSE:Factory/.llvm4.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "llvm4"

Thu Oct 19 19:31:30 2017 rev:9 rq:534875 version:4.0.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/llvm4/llvm4.changes      2017-09-11 
16:17:10.368042154 +0200
+++ /work/SRC/openSUSE:Factory/.llvm4.new/llvm4.changes 2017-10-19 
19:31:32.154563247 +0200
@@ -1,0 +2,51 @@
+Tue Oct 17 07:31:06 UTC 2017 - m...@suse.com
+
+- llvm-normally-versioned-libllvm.patch
+  * Change libLLVM naming scheme to match our naming guidelines.
+  * The reasons for the original naming scheme are no longer valid,
+    more details in the patch.
+
+-------------------------------------------------------------------
+Fri Oct 13 08:19:24 UTC 2017 - m...@suse.com
+
+- Disable all thread related tests in libcxx. Many of them use
+  timeouts to detect failure. They can fail randomly if the machine
+  is under heavy load (happens often in OBS).
+
+-------------------------------------------------------------------
+Tue Oct 10 12:14:31 UTC 2017 - m...@suse.com
+
+- Drop llvm4-devel-static. llvm4-devel contains shared library with
+  the same content.
+
+-------------------------------------------------------------------
+Wed Aug 30 12:08:17 UTC 2017 - m...@suse.com
+
+- Use LLVM_BUILD_LLVM_DYLIB instead of BUILD_SHARED_LIBS to build
+  single libLLVM library. This is the recommended way. The old way
+  was causing various issues.
+  * llvm-split-static-library-exports-into-their-own-export-file.diff
+  * clang-split-static-library-exports-into-their-own-export-file.diff
+  (bnc#1049703)
+
+- Add lld, linker for Clang/LLVM
+  (sr#517692)
+
+- Include clang++-MAJOR.MINOR symbolic link
+  (bnc#1012260)
+
+- Remove unnecessary dependency on flex and bison.
+
+- Make sure all binaries are managed by update-alternatives
+
+- Add llvm-add_a_LLVM_USE_LINKER.patch and link using gold to
+  prevent memory exhaustion on some build machines.
+
+- Reduce debuginfo on x86 architecture. LLVM libraries are so big that they
+  exhaust all memory on 32 bit machine if linked with full debuginfo.
+
+- Speed up build by skipping parts that are not required in stage1.
+
+- Build lldb in-tree as one of the llvm tools.
+
+-------------------------------------------------------------------

Old:
----
  lldb4.changes
  lldb4.spec

New:
----
  clang-split-static-library-exports-into-their-own-export-file.diff
  lld-4.0.1.src.tar.xz
  llvm-add_a_LLVM_USE_LINKER.patch
  llvm-normally-versioned-libllvm.patch
  llvm-split-static-library-exports-into-their-own-export-file.diff

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ llvm4.spec ++++++
++++ 811 lines (skipped)
++++ between /work/SRC/openSUSE:Factory/llvm4/llvm4.spec
++++ and /work/SRC/openSUSE:Factory/.llvm4.new/llvm4.spec

++++++ _constraints ++++++
--- /var/tmp/diff_new_pack.uaao2c/_old  2017-10-19 19:31:34.422457134 +0200
+++ /var/tmp/diff_new_pack.uaao2c/_new  2017-10-19 19:31:34.422457134 +0200
@@ -2,10 +2,10 @@
 <constraints>
   <hardware>
     <disk>
-        <size unit="G">30</size>
+        <size unit="G">45</size>
     </disk>
     <memory>
-      <size unit="M">4000</size>
+      <size unit="M">6500</size>
     </memory>
   </hardware>
   <overwrite>

++++++ clang-split-static-library-exports-into-their-own-export-file.diff ++++++
Index: cfe-4.0.1.src/cmake/modules/AddClang.cmake
===================================================================
--- cfe-4.0.1.src.orig/cmake/modules/AddClang.cmake
+++ cfe-4.0.1.src/cmake/modules/AddClang.cmake
@@ -92,7 +92,11 @@ macro(add_clang_library name)
 
       if(${name} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR
           NOT LLVM_DISTRIBUTION_COMPONENTS)
-        set(export_to_clangtargets EXPORT ClangTargets)
+        if(ARG_SHARED)
+          set(export_to_clangtargets EXPORT ClangTargets)
+        else()
+          set(export_to_clangtargets EXPORT ClangStaticTargets)
+        endif()
         set_property(GLOBAL PROPERTY CLANG_HAS_EXPORTS True)
       endif()
 
Index: cfe-4.0.1.src/cmake/modules/CMakeLists.txt
===================================================================
--- cfe-4.0.1.src.orig/cmake/modules/CMakeLists.txt
+++ cfe-4.0.1.src/cmake/modules/CMakeLists.txt
@@ -10,12 +10,14 @@ export(TARGETS ${CLANG_EXPORTS} FILE ${c
 # Generate ClangConfig.cmake for the build tree.
 set(CLANG_CONFIG_CMAKE_DIR "${clang_cmake_builddir}")
 set(CLANG_CONFIG_EXPORTS_FILE "${clang_cmake_builddir}/ClangTargets.cmake")
+set(CLANG_CONFIG_STATIC_EXPORTS_FILE 
"${clang_cmake_builddir}/ClangStaticTargets.cmake")
 configure_file(
   ${CMAKE_CURRENT_SOURCE_DIR}/ClangConfig.cmake.in
   ${clang_cmake_builddir}/ClangConfig.cmake
   @ONLY)
 set(CLANG_CONFIG_CMAKE_DIR)
 set(CLANG_CONFIG_EXPORTS_FILE)
+set(CLANG_CONFIG_STATIC_EXPORTS_FILE)
 
 # Generate ClangConfig.cmake for the install tree.
 set(CLANG_CONFIG_CODE "
@@ -30,6 +32,7 @@ get_filename_component(CLANG_INSTALL_PRE
 endforeach(p)
 set(CLANG_CONFIG_CMAKE_DIR 
"\${CLANG_INSTALL_PREFIX}/${CLANG_INSTALL_PACKAGE_DIR}")
 set(CLANG_CONFIG_EXPORTS_FILE "\${CLANG_CMAKE_DIR}/ClangTargets.cmake")
+set(CLANG_CONFIG_STATIC_EXPORTS_FILE 
"\${CLANG_CMAKE_DIR}/ClangStaticTargets.cmake")
 configure_file(
   ${CMAKE_CURRENT_SOURCE_DIR}/ClangConfig.cmake.in
   ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/ClangConfig.cmake
@@ -37,11 +40,13 @@ configure_file(
 set(CLANG_CONFIG_CODE)
 set(CLANG_CONFIG_CMAKE_DIR)
 set(CLANG_CONFIG_EXPORTS_FILE)
+set(CLANG_CONFIG_STATIC_EXPORTS_FILE)
 
 if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
   get_property(clang_has_exports GLOBAL PROPERTY CLANG_HAS_EXPORTS)
   if(clang_has_exports)
     install(EXPORT ClangTargets DESTINATION ${CLANG_INSTALL_PACKAGE_DIR})
+    install(EXPORT ClangStaticTargets DESTINATION ${CLANG_INSTALL_PACKAGE_DIR})
   endif()
 
   install(FILES
Index: cfe-4.0.1.src/cmake/modules/ClangConfig.cmake.in
===================================================================
--- cfe-4.0.1.src.orig/cmake/modules/ClangConfig.cmake.in
+++ cfe-4.0.1.src/cmake/modules/ClangConfig.cmake.in
@@ -9,3 +9,4 @@ set(CLANG_CMAKE_DIR "@CLANG_CONFIG_CMAKE
 
 # Provide all our library targets to users.
 include("@CLANG_CONFIG_EXPORTS_FILE@")
+include("@CLANG_CONFIG_STATIC_EXPORTS_FILE@" OPTIONAL)
++++++ llvm-add_a_LLVM_USE_LINKER.patch ++++++
>From a9134d2526fa011a40656c2b5f8b5124fa38496d Mon Sep 17 00:00:00 2001
From: Mehdi Amini <mehdi.am...@apple.com>
Date: Sun, 15 Jan 2017 03:21:30 +0000
Subject: [PATCH] Add a LLVM_USE_LINKER that defines the linker to use when
 building LLVM

Summary:
This string parameter is passed to -fuse-ld when linking. It can be
an absolute path to your custom linker, otherwise clang will look for
`ld.{name}`.

Reviewers: davide, tejohnson, pcc

Subscribers: llvm-commits, mgorny

Differential Revision: https://reviews.llvm.org/D28738

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292047 
91177308-0d34-0410-b5e6-96231b3b80d8

diff --git a/cmake/modules/HandleLLVMOptions.cmake 
b/cmake/modules/HandleLLVMOptions.cmake
index 1825b55ed54..22ec8b546c8 100644
--- a/cmake/modules/HandleLLVMOptions.cmake
+++ b/cmake/modules/HandleLLVMOptions.cmake
@@ -147,9 +147,19 @@ function(add_flag_or_print_warning flag name)
   endif()
 endfunction()
 
-if(LLVM_ENABLE_LLD)
-  check_cxx_compiler_flag("-fuse-ld=lld" CXX_SUPPORTS_LLD)
-  append_if(CXX_SUPPORTS_LLD "-fuse-ld=lld"
+if( LLVM_ENABLE_LLD )
+       if ( LLVM_USE_LINKER )
+               message(FATAL_ERROR "LLVM_ENABLE_LLD and LLVM_USE_LINKER can't 
be set at the same time")
+       endif()
+       set(LLVM_USE_LINKER "lld")
+endif()
+
+if( LLVM_USE_LINKER )
+  check_cxx_compiler_flag("-fuse-ld=${LLVM_USE_LINKER}" 
CXX_SUPPORTS_CUSTOM_LINKER)
+  if ( NOT CXX_SUPPORTS_CUSTOM_LINKER )
+         message(FATAL_ERROR "Host compiler does not support 
'-fuse-ld=${LLVM_USE_LINKER}'")
+  endif()
+  append("-fuse-ld=${LLVM_USE_LINKER}"
     CMAKE_EXE_LINKER_FLAGS CMAKE_MODULE_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS)
 endif()
 
diff --git a/docs/CMake.rst b/docs/CMake.rst
index 28b6ea3959b..05885779efd 100644
--- a/docs/CMake.rst
+++ b/docs/CMake.rst
@@ -382,6 +382,18 @@ LLVM-specific variables
   lines, enabling link-time optimization. Possible values are ``Off``,
   ``On``, ``Thin`` and ``Full``. Defaults to OFF.
 
+**LLVM_USE_LINKER**:STRING
+  Add ``-fuse-ld={name}`` to the link invocation. The possible value depend on
+  your compiler, for clang the value can be an absolute path to your custom
+  linker, otherwise clang will prefix the name with ``ld.`` and apply its usual
+  search. For example to link LLVM with the Gold linker, cmake can be invoked
+  with ``-DLLVM_USE_LINKER=gold``.
+
+**LLVM_ENABLE_LLD**:BOOL
+  This option is equivalent to `-DLLVM_USE_LINKER=lld`, except during a 2-stage
+  build where a dependency is added from the first stage to the second ensuring
+  that lld is built before stage2 begins.
+
 **LLVM_PARALLEL_COMPILE_JOBS**:STRING
   Define the maximum number of concurrent compilation jobs.
 
++++++ llvm-normally-versioned-libllvm.patch ++++++
Before llvm4, both major and minor version updates of llvm were regularly
breaking API. Because of that, the libLLVM library was named in following
format: libLLVM-${major}-${minor}.so

  (https://bugs.llvm.org/show_bug.cgi?id=25059)
  (https://reviews.llvm.org/D13841)

The package containing this library was called libLLVM${major}_${minor} which
follows our guidelines.

Since llvm4, llvm decided to follow semantic versioning and only break API if
the major version was increased. In addition they do not intend to ever have
minor version other than 0.
  (http://blog.llvm.org/2016/12/llvms-new-versioning-scheme.html)

The package was renamed to libLLVM${major}, which no longer follows the naming
guidelines, but since the package contained multiple libraries, it was not
detected.

Since bnc#1049703 the libLLVM${major} package contains only the
libLLVM-${major}-${minor}.so library and no others. This triggers the
shlib-policy-name-error check in our packaging system.

Because the reasons for using the libLLVM-${major}-${minor}.so format are no
longer valid, lets revert back to libLLVM.so.${major}.${minor}.${version}
format. That way the package name matches our guidelines.

Index: llvm-4.0.1.src/tools/llvm-config/llvm-config.cpp
===================================================================
--- llvm-4.0.1.src.orig/tools/llvm-config/llvm-config.cpp
+++ llvm-4.0.1.src/tools/llvm-config/llvm-config.cpp
@@ -377,7 +377,6 @@ int main(int argc, char **argv) {
   } else {
     // default to the unix values:
     SharedExt = "so";
-    SharedVersionedExt = LLVM_DYLIB_VERSION ".so";
     StaticExt = "a";
     StaticDir = SharedDir = ActiveLibDir;
     StaticPrefix = SharedPrefix = "lib";
@@ -390,7 +389,7 @@ int main(int argc, char **argv) {
 
   bool DyLibExists = false;
   const std::string DyLibName =
-      (SharedPrefix + "LLVM-" + SharedVersionedExt).str();
+      (SharedPrefix + "LLVM." + SharedExt).str();
 
   // If LLVM_LINK_DYLIB is ON, the single shared library will be returned
   // for "--libs", etc, if they exist. This behaviour can be overridden with
Index: llvm-4.0.1.src/tools/llvm-shlib/CMakeLists.txt
===================================================================
--- llvm-4.0.1.src.orig/tools/llvm-shlib/CMakeLists.txt
+++ llvm-4.0.1.src/tools/llvm-shlib/CMakeLists.txt
@@ -34,7 +34,7 @@ if(LLVM_DYLIB_EXPORTED_SYMBOL_FILE)
   add_custom_target(libLLVMExports DEPENDS ${LLVM_EXPORTED_SYMBOL_FILE})
 endif()
 
-add_llvm_library(LLVM SHARED DISABLE_LLVM_LINK_LLVM_DYLIB SONAME ${SOURCES})
+add_llvm_library(LLVM SHARED DISABLE_LLVM_LINK_LLVM_DYLIB ${SOURCES})
 
 list(REMOVE_DUPLICATES LIB_NAMES)
 if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" OR MINGW) # FIXME: It should be 
"GNU ld for elf"
++++++ llvm-split-static-library-exports-into-their-own-export-file.diff ++++++
Index: cmake/modules/AddLLVM.cmake
===================================================================
--- cmake/modules/AddLLVM.cmake.orig
+++ cmake/modules/AddLLVM.cmake
@@ -587,7 +587,11 @@ macro(add_llvm_library name)
 
       if(${name} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR
           NOT LLVM_DISTRIBUTION_COMPONENTS)
-        set(export_to_llvmexports EXPORT LLVMExports)
+        if (ARG_SHARED)
+          set(export_to_llvmexports EXPORT LLVMExports)
+        else()
+          set(export_to_llvmexports EXPORT LLVMStaticExports)
+        endif()
         set_property(GLOBAL PROPERTY LLVM_HAS_EXPORTS True)
       endif()
 
Index: cmake/modules/CMakeLists.txt
===================================================================
--- cmake/modules/CMakeLists.txt.orig
+++ cmake/modules/CMakeLists.txt
@@ -91,6 +91,7 @@ set(LLVM_CONFIG_BINARY_DIR "\${LLVM_INST
 set(LLVM_CONFIG_TOOLS_BINARY_DIR "\${LLVM_INSTALL_PREFIX}/bin")
 set(LLVM_CONFIG_EXPORTS_FILE "\${LLVM_CMAKE_DIR}/LLVMExports.cmake")
 set(LLVM_CONFIG_EXPORTS "${LLVM_EXPORTS}")
+set(LLVM_CONFIG_STATIC_EXPORTS_FILE 
"\${LLVM_CMAKE_DIR}/LLVMStaticExports.cmake")
 configure_file(
   LLVMConfig.cmake.in
   ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/LLVMConfig.cmake
@@ -107,6 +108,8 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
   if(llvm_has_exports)
     install(EXPORT LLVMExports DESTINATION ${LLVM_INSTALL_PACKAGE_DIR}
             COMPONENT cmake-exports)
+    install(EXPORT LLVMStaticExports DESTINATION ${LLVM_INSTALL_PACKAGE_DIR}
+            COMPONENT cmake-exports)
   endif()
 
   install(FILES
Index: cmake/modules/LLVMConfig.cmake.in
===================================================================
--- cmake/modules/LLVMConfig.cmake.in.orig
+++ cmake/modules/LLVMConfig.cmake.in
@@ -77,6 +77,8 @@ if(NOT TARGET LLVMSupport)
   set(LLVM_EXPORTED_TARGETS "@LLVM_CONFIG_EXPORTS@")
   include("@LLVM_CONFIG_EXPORTS_FILE@")
   @llvm_config_include_buildtree_only_exports@
+
+  include("@LLVM_CONFIG_STATIC_EXPORTS_FILE@" OPTIONAL)
 endif()
 
 include(${LLVM_CMAKE_DIR}/LLVM-Config.cmake)

Reply via email to