diff options
-rw-r--r-- | PKGBUILD | 47 | ||||
-rw-r--r-- | llvm_tools_shlib_CMakeLists.patch | 6 |
2 files changed, 7 insertions, 46 deletions
@@ -19,7 +19,7 @@ pkgname=( ) _pkgname='llvm' -pkgver=3.8.0svn_r246806 +pkgver=3.8.0svn_r246942 pkgrel=1 arch=('i686' 'x86_64') @@ -54,7 +54,7 @@ sha256sums=( 'SKIP' 'SKIP' '597dc5968c695bbdbb0eac9e8eb5117fcd2773bc91edf5ec103ecffffab8bc48' - 'f176e58b1f07aa3859f9d4b67e17eac88ad4de2f5d501ef968549d0419e76f65' + 'a1c9f36b97c639666ab6a1bd647a08a027e93e3d3cfd6f5af9c36e757599ce81' ) # @@ -139,48 +139,9 @@ build() { _ffi_include_flags=$(pkg-config --cflags-only-I libffi) _ffi_libs_flags=$(pkg-config --libs-only-L libffi) - # libLLVM.so doesn't include by default all components that we want to have. - # Therefore, we use the LLVM_DYLIB_COMPONENTS cmake variable futher below to - # add the desired ones (e.g. Option), but in order to be flexible we need to - # determine the default list of components from tools/llvm-shlib/CMakeLists.txt. - # We use some awk-ward magic to extract the values and format them appropriately. - _dylib_awk_cmds="\ - /^[[:blank:]]*set\\(LLVM_DYLIB_COMPONENTS$/,/^[[:blank:]]*\\)$/ { \ - if ( \ - substr(\$1,1,4) != \"set(\" \ - && substr(\$1,1,1) != \")\" \ - && substr(\$1,1,2) != \"\${\" \ - ) \ - components=components\$1\";\" \ - } END { print components }" - - _dylib_def_comp=$( - awk "${_dylib_awk_cmds}" "../${_pkgname}/tools/llvm-shlib/CMakeLists.txt" - ) - - # Find the targets in the default category 'all' (since we don't set them - # explicitly with LLVM_TARGETS_TO_BUILD, this is what gets built). We'll - # then have to list them manually in LLVM_DYLIB_COMPONENTS, otherwise - # (somewhat surprisingly) they don't get exported from libLLVM.so. - _tgts_awk_cmds="\ - /^[[:blank:]]*set\\(LLVM_ALL_TARGETS$/,/^[[:blank:]]*\\)$/ { \ - if ( \ - substr(\$1,1,4) != \"set(\" \ - && substr(\$1,1,1) != \")\" \ - && substr(\$1,1,2) != \"\${\" \ - ) \ - targets=targets\$1\";\" \ - } END { print targets }" - - _avail_tgts=$( - awk "${_tgts_awk_cmds}" "../${_pkgname}/CMakeLists.txt" - ) - - # Finally, here we set the additional components to export from libLLVM.so - _dylib_add_comp='Option;ProfileData;' - # LLVM_BUILD_LLVM_DYLIB: Build the dynamic runtime libraries (e.g. libLLVM.so). # LLVM_DYLIB_EXPORT_ALL: Export all symbols in the dynamic libs, not just the C API. + # LLVM_LINK_LLVM_DYLIB: Link our own tools against the libLLVM dynamic library, too. # LLVM_BINUTILS_INCDIR: Set to binutils' plugin-api.h location in order to build LLVMgold. cmake -G 'Unix Makefiles' \ -DCMAKE_BUILD_TYPE:STRING=Release \ @@ -196,8 +157,8 @@ build() { -DSPHINX_OUTPUT_MAN:BOOL=ON \ -DSPHINX_WARNINGS_AS_ERRORS:BOOL=OFF \ -DLLVM_BUILD_LLVM_DYLIB:BOOL=ON \ - -DLLVM_DYLIB_COMPONENTS:STRING="${_dylib_def_comp}${_dylib_add_comp}${_avail_tgts}" \ -DLLVM_DYLIB_EXPORT_ALL:BOOL=ON \ + -DLLVM_LINK_LLVM_DYLIB:BOOL=ON \ -DLLVM_BINUTILS_INCDIR:PATH=/usr/include \ "../${_pkgname}" diff --git a/llvm_tools_shlib_CMakeLists.patch b/llvm_tools_shlib_CMakeLists.patch index 551baeb7dde2..bc3d141da62d 100644 --- a/llvm_tools_shlib_CMakeLists.patch +++ b/llvm_tools_shlib_CMakeLists.patch @@ -1,6 +1,6 @@ ---- src/llvm/tools/llvm-shlib/CMakeLists.txt.orig 2015-08-01 20:44:00.656453569 +0300 -+++ src/llvm/tools/llvm-shlib/CMakeLists.txt 2015-08-04 21:51:43.609790978 +0300 -@@ -77,7 +77,7 @@ +--- src/llvm/tools/llvm-shlib/CMakeLists.txt.orig 2015-09-06 12:31:21.765250429 +0300 ++++ src/llvm/tools/llvm-shlib/CMakeLists.txt 2015-09-06 13:17:10.820174432 +0300 +@@ -64,7 +64,7 @@ if (LLVM_DYLIB_EXPORT_ALL) add_custom_command(OUTPUT ${LLVM_EXPORTED_SYMBOL_FILE} |