Commit f405aa18 authored by Jakub Jirutka's avatar Jakub Jirutka

main/llvm: improve abuild

Using both ON/OFF and YES/NO style is very confusing (ON-NO...).
parent b29a9c6b
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment