[arch-commits] Commit in (6 files)
Evangelos Foutras
foutrelis at archlinux.org
Thu Sep 27 21:16:07 UTC 2018
Date: Thursday, September 27, 2018 @ 21:16:06
Author: foutrelis
Revision: 335484
Add llvm6 package for crystal and ponyc
Added:
llvm6/
llvm6/repos/
llvm6/trunk/
llvm6/trunk/D44391-export-LLVM_DYLIB_COMPONENTS-in-LLVMConfig.cmake.patch
llvm6/trunk/D44420-cmake-fix-a-typo-in-llvm_config-macro.patch
llvm6/trunk/PKGBUILD
---------------------------------------------------------------+
D44391-export-LLVM_DYLIB_COMPONENTS-in-LLVMConfig.cmake.patch | 36 +++
D44420-cmake-fix-a-typo-in-llvm_config-macro.patch | 13 +
PKGBUILD | 91 ++++++++++
3 files changed, 140 insertions(+)
Added: llvm6/trunk/D44391-export-LLVM_DYLIB_COMPONENTS-in-LLVMConfig.cmake.patch
===================================================================
--- llvm6/trunk/D44391-export-LLVM_DYLIB_COMPONENTS-in-LLVMConfig.cmake.patch (rev 0)
+++ llvm6/trunk/D44391-export-LLVM_DYLIB_COMPONENTS-in-LLVMConfig.cmake.patch 2018-09-27 21:16:06 UTC (rev 335484)
@@ -0,0 +1,36 @@
+From 4d613a84ce271c6225068bef67d727ae02b2e3b1 Mon Sep 17 00:00:00 2001
+From: Pavel Labath <labath at google.com>
+Date: Wed, 14 Mar 2018 09:28:38 +0000
+Subject: [PATCH] Export LLVM_DYLIB_COMPONENTS in LLVMConfig.cmake
+
+Summary:
+This is needed so that external projects (e.g. a standalone build of
+lldb) can link to the LLVM shared library via the USE_SHARED argument of
+llvm_config. Without this, llvm_config would add LLVM to the link list,
+but then also add the constituent static libraries, resulting in
+multiply defined symbols.
+
+Reviewers: beanz, mgorny
+
+Subscribers: llvm-commits
+
+Differential Revision: https://reviews.llvm.org/D44391
+
+git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@327484 91177308-0d34-0410-b5e6-96231b3b80d8
+---
+ cmake/modules/LLVMConfig.cmake.in | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/cmake/modules/LLVMConfig.cmake.in b/cmake/modules/LLVMConfig.cmake.in
+index fe4df5278498..e70018679846 100644
+--- a/cmake/modules/LLVMConfig.cmake.in
++++ b/cmake/modules/LLVMConfig.cmake.in
+@@ -13,6 +13,8 @@ set(LLVM_COMMON_DEPENDS @LLVM_COMMON_DEPENDS@)
+
+ set(LLVM_AVAILABLE_LIBS @LLVM_AVAILABLE_LIBS@)
+
++set(LLVM_DYLIB_COMPONENTS @LLVM_DYLIB_COMPONENTS@)
++
+ set(LLVM_ALL_TARGETS @LLVM_ALL_TARGETS@)
+
+ set(LLVM_TARGETS_TO_BUILD @LLVM_TARGETS_TO_BUILD@)
Added: llvm6/trunk/D44420-cmake-fix-a-typo-in-llvm_config-macro.patch
===================================================================
--- llvm6/trunk/D44420-cmake-fix-a-typo-in-llvm_config-macro.patch (rev 0)
+++ llvm6/trunk/D44420-cmake-fix-a-typo-in-llvm_config-macro.patch 2018-09-27 21:16:06 UTC (rev 335484)
@@ -0,0 +1,13 @@
+Index: cmake/modules/LLVM-Config.cmake
+===================================================================
+--- cmake/modules/LLVM-Config.cmake
++++ cmake/modules/LLVM-Config.cmake
+@@ -68,7 +68,7 @@
+ cmake_parse_arguments(ARG "USE_SHARED" "" "" ${ARGN})
+ set(link_components ${ARG_UNPARSED_ARGUMENTS})
+
+- if(USE_SHARED)
++ if(ARG_USE_SHARED)
+ # If USE_SHARED is specified, then we link against libLLVM,
+ # but also against the component libraries below. This is
+ # done in case libLLVM does not contain all of the components
Added: llvm6/trunk/PKGBUILD
===================================================================
--- llvm6/trunk/PKGBUILD (rev 0)
+++ llvm6/trunk/PKGBUILD 2018-09-27 21:16:06 UTC (rev 335484)
@@ -0,0 +1,91 @@
+# Maintainer: Evangelos Foutras <evangelos at foutrelis.com>
+# Contributor: Jan "heftig" Steffens <jan.steffens at gmail.com>
+
+# ************************************************************************** #
+# This package is meant to be used for compiling packages that have not been #
+# ported to LLVM 7 yet. Such packages may depend on llvm6-libs but not llvm6 #
+# which is not co-installable with the main llvm package (currently LLVM 7). #
+# ************************************************************************** #
+
+pkgname=('llvm6' 'llvm6-libs')
+pkgver=6.0.1
+pkgrel=1
+arch=('x86_64')
+url="https://llvm.org/"
+license=('custom:University of Illinois/NCSA Open Source License')
+makedepends=('cmake' 'ninja' 'libffi' 'libedit' 'ncurses' 'libxml2')
+options=('staticlibs')
+source=(https://releases.llvm.org/$pkgver/llvm-$pkgver.src.tar.xz{,.sig}
+ D44391-export-LLVM_DYLIB_COMPONENTS-in-LLVMConfig.cmake.patch
+ D44420-cmake-fix-a-typo-in-llvm_config-macro.patch)
+sha256sums=('b6d6c324f9c71494c0ccaf3dac1f16236d970002b42bb24a6c9e1634f7d0f4e2'
+ 'SKIP'
+ '96e2f3ca8b7d1bdbe2606a1eebb12c57b39838d1bcc15e40388e8d59649a9f4a'
+ '5cc114fd711e6ea836a6270b2f713e2e751c49e8b5ffa6c6812127ca801acef3')
+validpgpkeys+=('B6C8F98282B944E3B0D5C2530FC3042E345AD05D') # Hans Wennborg <hans at chromium.org>
+validpgpkeys+=('474E22316ABF4785A88C6E8EA2C794A986419D8A') # Tom Stellard <tstellar at redhat.com>
+
+prepare() {
+ cd "$srcdir/llvm-$pkgver.src"
+ mkdir build
+
+ # https://reviews.llvm.org/D44391
+ patch -Np1 -i ../D44391-export-LLVM_DYLIB_COMPONENTS-in-LLVMConfig.cmake.patch
+
+ # https://reviews.llvm.org/D44420
+ patch -Np0 -i ../D44420-cmake-fix-a-typo-in-llvm_config-macro.patch
+}
+
+build() {
+ cd "$srcdir/llvm-$pkgver.src/build"
+
+ cmake .. -G Ninja \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DLLVM_HOST_TRIPLE=$CHOST \
+ -DLLVM_BUILD_LLVM_DYLIB=ON \
+ -DLLVM_LINK_LLVM_DYLIB=ON \
+ -DLLVM_INSTALL_UTILS=ON \
+ -DLLVM_ENABLE_RTTI=ON \
+ -DLLVM_ENABLE_FFI=ON \
+ -DLLVM_BUILD_TESTS=ON \
+ -DFFI_INCLUDE_DIR=$(pkg-config --variable=includedir libffi) \
+ -DLLVM_BINUTILS_INCDIR=/usr/include
+ ninja
+}
+
+check() {
+ cd "$srcdir/llvm-$pkgver.src/build"
+ ninja check
+}
+
+package_llvm6() {
+ pkgdesc="Collection of modular and reusable compiler and toolchain technologies"
+ depends=('llvm6-libs' 'perl')
+ conflicts=('llvm')
+
+ cd "$srcdir/llvm-$pkgver.src/build"
+
+ DESTDIR="$pkgdir" ninja install
+
+ # The runtime library go into llvm6-libs
+ mv -f "$pkgdir"/usr/lib/libLLVM-*.so "$srcdir"
+
+ # Remove files which conflict with llvm-libs
+ rm "$pkgdir"/usr/lib/{LLVMgold,lib{LLVM,LTO}}.so
+
+ install -Dm644 ../LICENSE.TXT "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+package_llvm6-libs() {
+ pkgdesc="LLVM 6 runtime libraries"
+ depends=('gcc-libs' 'zlib' 'libffi' 'libedit' 'ncurses' 'libxml2')
+
+ install -d "$pkgdir/usr/lib"
+ cp -P "$srcdir"/libLLVM-*.so "$pkgdir/usr/lib/"
+
+ install -Dm644 "$srcdir/llvm-$pkgver.src/LICENSE.TXT" \
+ "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+# vim:set ts=2 sw=2 et:
More information about the arch-commits
mailing list