aboutsummaryrefslogtreecommitdiffstats
path: root/main/llvm
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2017-04-11 02:12:46 +0200
committerJakub Jirutka <jakub@jirutka.cz>2017-04-11 18:58:12 +0200
commitf405aa1840993d50a294dbae01a446173f95ac0f (patch)
tree44b0fd8971d2969df2ccd358d5ba0e359fa82a83 /main/llvm
parentb29a9c6b71d98426bbb5368b547ae4b01c7e0067 (diff)
downloadaports-f405aa1840993d50a294dbae01a446173f95ac0f.tar.bz2
aports-f405aa1840993d50a294dbae01a446173f95ac0f.tar.xz
main/llvm: improve abuild
Using both ON/OFF and YES/NO style is very confusing (ON-NO...).
Diffstat (limited to 'main/llvm')
-rw-r--r--main/llvm/APKBUILD59
1 files changed, 29 insertions, 30 deletions
diff --git a/main/llvm/APKBUILD b/main/llvm/APKBUILD
index 953c5f0155..6caa8f51fc 100644
--- a/main/llvm/APKBUILD
+++ b/main/llvm/APKBUILD
@@ -7,7 +7,6 @@ pkgdesc="Low Level Virtual Machine compiler system"
arch="all"
url="http://llvm.org/"
license="UOI-NCSA"
-depends=""
depends_dev="perl"
makedepends="$depends_dev
binutils-dev
@@ -21,7 +20,7 @@ makedepends="$depends_dev
libffi-dev
make
paxmark
- py-sphinx
+ py2-sphinx
python2
python2-dev
zlib-dev
@@ -50,44 +49,43 @@ prepare() {
rm test/tools/llvm-objdump/macho-compact-unwind-x86_64.test \
test/tools/llvm-objdump/macho-compact-unwind-i386.test \
test/Transforms/GlobalOpt/alias-used.ll \
- test/tools/llvm-symbolizer/print_context.c \
- || return 1
+ test/tools/llvm-symbolizer/print_context.c
}
build() {
mkdir -p "$builddir"/build
cd "$builddir"/build
- # auto-detect it by guessing either.
- _ffi_include_dir="$(pkg-config --cflags-only-I libffi | sed 's|^-I||g')"
+ # Auto-detect it by guessing either.
+ local ffi_include_dir="$(pkg-config --cflags-only-I libffi | sed 's|^-I||g')"
cmake -G "Unix Makefiles" -Wno-dev \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
- -DCMAKE_VERBOSE_MAKEFILE=NO \
+ -DCMAKE_VERBOSE_MAKEFILE=OFF \
\
- -DFFI_INCLUDE_DIR="$_ffi_include_dir" \
+ -DFFI_INCLUDE_DIR="$ffi_include_dir" \
-DLLVM_BINUTILS_INCDIR=/usr/include \
- -DLLVM_BUILD_DOCS=YES \
- -DLLVM_BUILD_EXAMPLES=NO \
- -DLLVM_BUILD_EXTERNAL_COMPILER_RT:BOOL=ON \
- -DLLVM_BUILD_LLVM_DYLIB:BOOL=ON \
- -DLLVM_BUILD_TESTS=YES \
- -DLLVM_DEFAULT_TARGET_TRIPLE=$CBUILD \
- -DLLVM_DYLIB_EXPORT_ALL:BOOL=ON \
- -DLLVM_ENABLE_ASSERTIONS=NO \
- -DLLVM_ENABLE_CXX1Y=YES \
- -DLLVM_ENABLE_FFI=YES \
- -DLLVM_ENABLE_LIBCXX=NO \
- -DLLVM_ENABLE_PIC=YES \
- -DLLVM_ENABLE_RTTI=YES \
- -DLLVM_ENABLE_SPHINX=YES \
- -DLLVM_ENABLE_TERMINFO=YES \
- -DLLVM_ENABLE_ZLIB=YES \
- -DLLVM_HOST_TRIPLE=$CHOST \
- -DLLVM_INCLUDE_EXAMPLES=NO \
- -DLLVM_LINK_LLVM_DYLIB:BOOL=ON \
- -DLLVM_TARGETS_TO_BUILD=all \
+ -DLLVM_BUILD_DOCS=ON \
+ -DLLVM_BUILD_EXAMPLES=OFF \
+ -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON \
+ -DLLVM_BUILD_LLVM_DYLIB=ON \
+ -DLLVM_BUILD_TESTS=ON \
+ -DLLVM_DEFAULT_TARGET_TRIPLE="$CBUILD" \
+ -DLLVM_DYLIB_EXPORT_ALL=ON \
+ -DLLVM_ENABLE_ASSERTIONS=OFF \
+ -DLLVM_ENABLE_CXX1Y=ON \
+ -DLLVM_ENABLE_FFI=ON \
+ -DLLVM_ENABLE_LIBCXX=OFF \
+ -DLLVM_ENABLE_PIC=ON \
+ -DLLVM_ENABLE_RTTI=ON \
+ -DLLVM_ENABLE_SPHINX=OFF \
+ -DLLVM_ENABLE_TERMINFO=ON \
+ -DLLVM_ENABLE_ZLIB=ON \
+ -DLLVM_HOST_TRIPLE="$CHOST" \
+ -DLLVM_INCLUDE_EXAMPLES=OFF \
+ -DLLVM_LINK_LLVM_DYLIB=ON \
+ -DLLVM_TARGETS_TO_BUILD=ALL \
\
-DSPHINX_WARNINGS_AS_ERRORS=NO \
"$builddir" || return 1
@@ -95,7 +93,8 @@ build() {
make llvm-tblgen || return 1
make || return 1
- paxmark m bin/llvm-rtdyld \
+ paxmark m \
+ bin/llvm-rtdyld \
bin/lli \
bin/lli-child-target \
unittests/ExecutionEngine/MCJIT/MCJITTests \
@@ -117,7 +116,7 @@ package() {
make DESTDIR="$pkgdir" install || return 1
- # Remove RPATHs
+ # Remove RPATHs.
file "$pkgdir"/lib/*.so "$pkgdir"/bin/* \
| awk -F: '$2~/ELF/{print $1}' \
| xargs -r chrpath -d