summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLone_Wolf2021-04-05 13:00:58 +0200
committerLone_Wolf2021-04-05 13:00:58 +0200
commitc3a11aabb2bdf34c9b9c8d6424a4cc2514c6bd5d (patch)
tree49f8e513270e5900887f402a447d674dbe260d5a
parentdfbe056b3446ab02373a53c4323cc863b35f8f3b (diff)
downloadaur-c3a11aabb2bdf34c9b9c8d6424a4cc2514c6bd5d.tar.gz
minor changes + revert upstream commit 43ceb74eb1a5801662419fb66a6bf0d5414f1ec5 as it breaks build, see also https://bugs.llvm.org/show_bug.cgi?id=49818
-rw-r--r--.SRCINFO11
-rw-r--r--PKGBUILD19
-rw-r--r--llvm-shlib_Create_object_libraries_for_each_component_and_link_against_them.patch54
3 files changed, 75 insertions, 9 deletions
diff --git a/.SRCINFO b/.SRCINFO
index df725dd61d0..5fbbf49f297 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,5 +1,5 @@
pkgbase = llvm-git
- pkgver = 13.0.0_r383812.aa979084dffb
+ pkgver = 13.0.0_r384605.36d4f6d7f8ad
pkgrel = 1
url = https://llvm.org/
arch = x86_64
@@ -29,15 +29,18 @@ pkgbase = llvm-git
makedepends = jsoncpp
options = staticlibs
source = llvm-project::git+https://github.com/llvm/llvm-project.git
- source = llvm-config.h
+ source = local://llvm-config.h
+ source = local://llvm-shlib_Create_object_libraries_for_each_component_and_link_against_them.patch
md5sums = SKIP
md5sums = 295c343dcd457dc534662f011d7cff1a
+ md5sums = 5c9db72a8239005aaae0b2790c1df84f
sha512sums = SKIP
sha512sums = 75e743dea28b280943b3cc7f8bbb871b57d110a7f2b9da2e6845c1c36bf170dd883fca54e463f5f49e0c3effe07fbd0db0f8cf5a12a2469d3f792af21a73fcdd
+ sha512sums = ffc3d1bc65c3b28ecf2b593ffbdb1bc426dd8291219b2d2e219ab458d704687293246f4a31459b1ddb50e18482884a36815a47234bb02f59fb4280cf2223d8b1
pkgname = llvm-git
pkgdesc = LLVM development version. includes clang and many other tools
- depends = llvm-libs-git=13.0.0_r383812.aa979084dffb-1
+ depends = llvm-libs-git=13.0.0_r384605.36d4f6d7f8ad-1
depends = perl
optdepends = python: for scripts
optdepends = python-setuptools: for using lit = LLVM Integrated Tester
@@ -75,7 +78,7 @@ pkgname = llvm-libs-git
pkgname = llvm-ocaml-git
pkgdesc = OCaml bindings for LLVM
- depends = llvm-git=13.0.0_r383812.aa979084dffb-1
+ depends = llvm-git=13.0.0_r384605.36d4f6d7f8ad-1
depends = ocaml
depends = ocaml-ctypes
provides = llvm-ocaml
diff --git a/PKGBUILD b/PKGBUILD
index a6e8710a7b3..5530c5aecd5 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -16,7 +16,7 @@
pkgname=('llvm-git' 'llvm-libs-git' 'llvm-ocaml-git')
-pkgver=13.0.0_r383813.61a55c8812e7
+pkgver=13.0.0_r384605.36d4f6d7f8ad
pkgrel=1
arch=('x86_64')
url="https://llvm.org/"
@@ -25,12 +25,15 @@ makedepends=( 'git' 'cmake' 'ninja' 'libffi' 'libedit' 'ncurses' 'libxml2' 'py
'ocaml' 'ocaml-ctypes' 'ocaml-findlib'
'python-sphinx' 'python-recommonmark' 'swig' 'python' 'python-six' 'lua' 'ocl-icd' 'opencl-headers' 'z3' 'jsoncpp')
source=("llvm-project::git+https://github.com/llvm/llvm-project.git"
- 'llvm-config.h')
+ 'local://llvm-config.h'
+ 'local://llvm-shlib_Create_object_libraries_for_each_component_and_link_against_them.patch')
md5sums=('SKIP'
- '295c343dcd457dc534662f011d7cff1a')
+ '295c343dcd457dc534662f011d7cff1a'
+ '5c9db72a8239005aaae0b2790c1df84f')
sha512sums=('SKIP'
- '75e743dea28b280943b3cc7f8bbb871b57d110a7f2b9da2e6845c1c36bf170dd883fca54e463f5f49e0c3effe07fbd0db0f8cf5a12a2469d3f792af21a73fcdd')
+ '75e743dea28b280943b3cc7f8bbb871b57d110a7f2b9da2e6845c1c36bf170dd883fca54e463f5f49e0c3effe07fbd0db0f8cf5a12a2469d3f792af21a73fcdd'
+ 'ffc3d1bc65c3b28ecf2b593ffbdb1bc426dd8291219b2d2e219ab458d704687293246f4a31459b1ddb50e18482884a36815a47234bb02f59fb4280cf2223d8b1')
options=('staticlibs')
# NINJAFLAGS is an env var used to pass commandline options to ninja
@@ -57,6 +60,11 @@ pkgver() {
echo "$_pkgver"
}
+prepare() {
+ cd llvm-project
+ patch --reverse --strip=1 --input="${srcdir}/llvm-shlib_Create_object_libraries_for_each_component_and_link_against_them.patch"
+}
+
build() {
export CFLAGS+=" ${CPPFLAGS}"
@@ -84,7 +92,8 @@ build() {
-D SPHINX_WARNINGS_AS_ERRORS=OFF \
-D POLLY_ENABLE_GPGPU_CODEGEN=ON \
-D LLDB_USE_SYSTEM_SIX=1 \
- -D LLVM_ENABLE_PROJECTS="polly;lldb;lld;compiler-rt;clang-tools-extra;clang"
+ -D LLVM_ENABLE_PROJECTS="polly;lldb;lld;compiler-rt;clang-tools-extra;clang" \
+ -Wno-dev
ninja -C _build $NINJAFLAGS
ninja -C _build $NINJAFLAGS ocaml_doc
diff --git a/llvm-shlib_Create_object_libraries_for_each_component_and_link_against_them.patch b/llvm-shlib_Create_object_libraries_for_each_component_and_link_against_them.patch
new file mode 100644
index 00000000000..6e679727635
--- /dev/null
+++ b/llvm-shlib_Create_object_libraries_for_each_component_and_link_against_them.patch
@@ -0,0 +1,54 @@
+From 43ceb74eb1a5801662419fb66a6bf0d5414f1ec5 Mon Sep 17 00:00:00 2001
+From: Tom Stellard <tstellar@redhat.com>
+Date: Wed, 31 Mar 2021 21:35:04 -0700
+Subject: [PATCH] llvm-shlib: Create object libraries for each component and
+ link against them
+
+This makes it possible to build libLLVM.so without first creating a
+static library for each component. In the case where only libLLVM.so is
+built (i.e. ninja LLVM) this eliminates 150 linker jobs.
+
+Reviewed By: stellaraccident
+
+Differential Revision: https://reviews.llvm.org/D95727
+---
+ llvm/cmake/modules/AddLLVM.cmake | 3 ++-
+ llvm/tools/llvm-shlib/CMakeLists.txt | 4 ++++
+ 2 files changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake
+index 2f055c7799624..c7a50b7a393ef 100644
+--- a/llvm/cmake/modules/AddLLVM.cmake
++++ b/llvm/cmake/modules/AddLLVM.cmake
+@@ -488,6 +488,7 @@ function(llvm_add_library name)
+ add_dependencies(${obj_name} ${link_lib})
+ endif()
+ endforeach()
++ target_link_libraries(${obj_name} ${ARG_LINK_LIBS})
+ endif()
+ endif()
+
+@@ -746,7 +747,7 @@ function(add_llvm_component_library name)
+ "COMPONENT_NAME;ADD_TO_COMPONENT"
+ ""
+ ${ARGN})
+- add_llvm_library(${name} COMPONENT_LIB ${ARG_UNPARSED_ARGUMENTS})
++ add_llvm_library(${name} COMPONENT_LIB OBJECT ${ARG_UNPARSED_ARGUMENTS})
+ string(REGEX REPLACE "^LLVM" "" component_name ${name})
+ set_property(TARGET ${name} PROPERTY LLVM_COMPONENT_NAME ${component_name})
+
+diff --git a/llvm/tools/llvm-shlib/CMakeLists.txt b/llvm/tools/llvm-shlib/CMakeLists.txt
+index b0ee19049e6fa..728995ad8b299 100644
+--- a/llvm/tools/llvm-shlib/CMakeLists.txt
++++ b/llvm/tools/llvm-shlib/CMakeLists.txt
+@@ -33,6 +33,10 @@ if(LLVM_BUILD_LLVM_DYLIB)
+ add_llvm_library(LLVM SHARED DISABLE_LLVM_LINK_LLVM_DYLIB SONAME ${INSTALL_WITH_TOOLCHAIN} ${SOURCES})
+
+ list(REMOVE_DUPLICATES LIB_NAMES)
++
++ # Link against the object libraries instead of static libraries.
++ list(TRANSFORM LIB_NAMES PREPEND "obj.")
++
+ if(("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") OR (MINGW) OR (HAIKU)
+ OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD")
+ OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "GNU")