ldc: Update from 1.8 to 1.9

This commit is contained in:
Joakim 2018-04-30 09:47:35 +00:00 committed by Fredrik Fornwall
parent e63f7399e1
commit 62d67962d6
2 changed files with 19 additions and 29 deletions

View File

@ -1,9 +1,9 @@
TERMUX_PKG_HOMEPAGE=https://github.com/ldc-developers/ldc TERMUX_PKG_HOMEPAGE=https://github.com/ldc-developers/ldc
TERMUX_PKG_DESCRIPTION="D programming language compiler, built with LLVM" TERMUX_PKG_DESCRIPTION="D programming language compiler, built with LLVM"
_PKG_MAJOR_VERSION=1.8 _PKG_MAJOR_VERSION=1.9
TERMUX_PKG_VERSION=${_PKG_MAJOR_VERSION}.0 TERMUX_PKG_VERSION=${_PKG_MAJOR_VERSION}.0
TERMUX_PKG_SRCURL=https://github.com/ldc-developers/ldc/releases/download/v${TERMUX_PKG_VERSION}/ldc-${TERMUX_PKG_VERSION}-src.tar.gz TERMUX_PKG_SRCURL=https://github.com/ldc-developers/ldc/releases/download/v${TERMUX_PKG_VERSION}/ldc-${TERMUX_PKG_VERSION}-src.tar.gz
TERMUX_PKG_SHA256=e421a1f4bbf97d173bd277125794862ca5b6a09409586b806cec23b922955c7f TERMUX_PKG_SHA256=e3f32a4dfcaae12f434e0e23638684faa83765827e7f2deb2df059dccc3169b9
TERMUX_PKG_DEPENDS="clang" TERMUX_PKG_DEPENDS="clang"
TERMUX_PKG_HOSTBUILD=true TERMUX_PKG_HOSTBUILD=true
TERMUX_PKG_BLACKLISTED_ARCHES="aarch64,i686,x86_64" TERMUX_PKG_BLACKLISTED_ARCHES="aarch64,i686,x86_64"
@ -15,17 +15,18 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
-DLLVM_BUILD_UTILS=OFF -DLLVM_BUILD_UTILS=OFF
-DLLVM_TABLEGEN=$TERMUX_PKG_HOSTBUILD_DIR/bin/llvm-tblgen -DLLVM_TABLEGEN=$TERMUX_PKG_HOSTBUILD_DIR/bin/llvm-tblgen
-DPYTHON_EXECUTABLE=`which python` -DPYTHON_EXECUTABLE=`which python`
-DCOMPILER_RT_INCLUDE_TESTS=OFF
" "
TERMUX_PKG_KEEP_STATIC_LIBRARIES=true TERMUX_PKG_KEEP_STATIC_LIBRARIES=true
TERMUX_PKG_NO_DEVELSPLIT=yes TERMUX_PKG_NO_DEVELSPLIT=yes
TERMUX_PKG_MAINTAINER="Joakim @joakim-noah" TERMUX_PKG_MAINTAINER="Joakim @joakim-noah"
termux_step_post_extract_package () { termux_step_post_extract_package () {
local LLVM_SRC_VERSION=5.0.1 local LLVM_SRC_VERSION=6.0.0
termux_download \ termux_download \
https://github.com/ldc-developers/llvm/releases/download/ldc-v${LLVM_SRC_VERSION}/llvm-${LLVM_SRC_VERSION}.src.tar.xz \ https://github.com/ldc-developers/llvm/releases/download/ldc-v${LLVM_SRC_VERSION}/llvm-${LLVM_SRC_VERSION}.src.tar.xz \
$TERMUX_PKG_CACHEDIR/llvm-${LLVM_SRC_VERSION}.src.tar.xz \ $TERMUX_PKG_CACHEDIR/llvm-${LLVM_SRC_VERSION}.src.tar.xz \
aa54870d2d4ab0066f8e26fe6880ec037565b0350d67bef55d0ac2018bfb1a45 5444d9da5929fd9062ac3d7793f484366de8b372411e0e5602ea23c2ff3fdb05
tar xf $TERMUX_PKG_CACHEDIR/llvm-${LLVM_SRC_VERSION}.src.tar.xz tar xf $TERMUX_PKG_CACHEDIR/llvm-${LLVM_SRC_VERSION}.src.tar.xz
mv llvm-${LLVM_SRC_VERSION}.src llvm mv llvm-${LLVM_SRC_VERSION}.src llvm
@ -33,22 +34,22 @@ termux_step_post_extract_package () {
termux_download \ termux_download \
https://github.com/ldc-developers/ldc/releases/download/v${TERMUX_PKG_VERSION}/ldc2-${TERMUX_PKG_VERSION}-linux-x86_64.tar.xz \ https://github.com/ldc-developers/ldc/releases/download/v${TERMUX_PKG_VERSION}/ldc2-${TERMUX_PKG_VERSION}-linux-x86_64.tar.xz \
$TERMUX_PKG_CACHEDIR/ldc2-${TERMUX_PKG_VERSION}-linux-x86_64.tar.xz \ $TERMUX_PKG_CACHEDIR/ldc2-${TERMUX_PKG_VERSION}-linux-x86_64.tar.xz \
81486dba1788be70a0e5dbf482d7e023aefb6389e049abebb94ee9686e04fee6 e33e02456878776b9ba864a47ceb445aa6474a24167f26eab36fd9bb4276dcc5
local DMD_COMPILER_VERSION=2.079.0 local TOOLS_VERSION=2.079.1
termux_download \ termux_download \
https://github.com/dlang/tools/archive/v${DMD_COMPILER_VERSION}.tar.gz \ https://github.com/dlang/tools/archive/v${TOOLS_VERSION}.tar.gz \
$TERMUX_PKG_CACHEDIR/tools-v${DMD_COMPILER_VERSION}.tar.gz \ $TERMUX_PKG_CACHEDIR/tools-v${TOOLS_VERSION}.tar.gz \
84598250c08ce1bdb9836a652c8ae09d8a5c429e60466b64df6c28fc9a24e684 37e04b77a0ff5e13350662945327dccba4bcd4975d45b61db2524eadad3d56fe
tar xf $TERMUX_PKG_CACHEDIR/tools-v${DMD_COMPILER_VERSION}.tar.gz tar xf $TERMUX_PKG_CACHEDIR/tools-v${TOOLS_VERSION}.tar.gz
mv tools-${DMD_COMPILER_VERSION} rdmd mv tools-${TOOLS_VERSION} rdmd
local DUB_VERSION=1.8.0 local DUB_VERSION=1.8.1
termux_download \ termux_download \
https://github.com/dlang/dub/archive/v${DUB_VERSION}.tar.gz \ https://github.com/dlang/dub/archive/v${DUB_VERSION}.tar.gz \
$TERMUX_PKG_CACHEDIR/dub-v${DUB_VERSION}.tar.gz \ $TERMUX_PKG_CACHEDIR/dub-v${DUB_VERSION}.tar.gz \
acffbdee967a20aba2c08d2a9de6a8b23b8fb5a703eece684781758db2831d50 79ad2dca0679f6d8b6a4d75e7ccea7930957134743bba290c949d5aa1aa53a14
tar xf $TERMUX_PKG_CACHEDIR/dub-v${DUB_VERSION}.tar.gz tar xf $TERMUX_PKG_CACHEDIR/dub-v${DUB_VERSION}.tar.gz
mv dub-${DUB_VERSION} dub mv dub-${DUB_VERSION} dub
@ -74,7 +75,8 @@ termux_step_host_build () {
termux_setup_ninja termux_setup_ninja
cmake -GNinja $TERMUX_PKG_SRCDIR/llvm \ cmake -GNinja $TERMUX_PKG_SRCDIR/llvm \
-DLLVM_BUILD_TOOLS=OFF \ -DLLVM_BUILD_TOOLS=OFF \
-DLLVM_BUILD_UTILS=OFF -DLLVM_BUILD_UTILS=OFF \
-DCOMPILER_RT_INCLUDE_TESTS=OFF
ninja -j $TERMUX_MAKE_PROCESSES llvm-tblgen ninja -j $TERMUX_MAKE_PROCESSES llvm-tblgen
CC="$TERMUX_STANDALONE_TOOLCHAIN/bin/$TERMUX_HOST_PLATFORM-clang" \ CC="$TERMUX_STANDALONE_TOOLCHAIN/bin/$TERMUX_HOST_PLATFORM-clang" \

View File

@ -52,21 +52,9 @@ CXXFLAGS="${CFLAGS} -fvisibility-inlines-hidden -Wcast-qual -Wnon-virtual-dtor -
if [ "$has_rtti" != "YES" ]; then CXXFLAGS="$CXXFLAGS -fno-rtti"; fi if [ "$has_rtti" != "YES" ]; then CXXFLAGS="$CXXFLAGS -fno-rtti"; fi
LDFLAGS="-L${prefix}/lib" LDFLAGS="-L${prefix}/lib"
LIBFILE="${prefix}/lib/libLLVM-$version.so" LIBFILE="${prefix}/lib/libLLVM-$version.so"
LLVM_LIBRARIES="-lLLVMTableGen -lLLVMLibDriver -lLLVMOption -lLLVMSymbolize -lLLVMDebugInfoPDB -lLLVMDebugInfoDWARF -lLLVMTestingSupport -lLLVMAArch64Disassembler -lLLVMAArch64CodeGen -lLLVMAArch64AsmParser -lLLVMAArch64Desc -lLLVMAArch64Info -lLLVMAArch64AsmPrinter -lLLVMAArch64Utils -lLLVMARMDisassembler -lLLVMARMCodeGen -lLLVMARMAsmParser -lLLVMARMDesc -lLLVMARMInfo -lLLVMARMAsmPrinter -lLLVMLineEditor -lLLVMMIRParser -lLLVMLTO -lLLVMPasses -lLLVMObjCARCOpts -lLLVMOrcJIT -lLLVMInterpreter -lLLVMObjectYAML -lLLVMX86Disassembler -lLLVMX86AsmParser -lLLVMX86CodeGen -lLLVMGlobalISel -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMDebugInfoCodeView -lLLVMDebugInfoMSF -lLLVMCodeGen -lLLVMX86Desc -lLLVMMCDisassembler -lLLVMX86Info -lLLVMX86AsmPrinter -lLLVMX86Utils -lLLVMMCJIT -lLLVMExecutionEngine -lLLVMTarget -lLLVMRuntimeDyld -lgtest_main -lgtest -lLLVMCoroutines -lLLVMipo -lLLVMInstrumentation -lLLVMVectorize -lLLVMScalarOpts -lLLVMLinker -lLLVMIRReader -lLLVMAsmParser -lLLVMDlltoolDriver -lLLVMInstCombine -lLLVMTransformUtils -lLLVMBitWriter -lLLVMAnalysis -lLLVMCoverage -lLLVMProfileData -lLLVMObject -lLLVMMCParser -lLLVMMC -lLLVMBitReader -lLLVMCore -lLLVMBinaryFormat -lLLVMSupport -lLLVMDemangle" LLVM_LIBRARIES="-lLLVMTableGen -lLLVMARMDisassembler -lLLVMARMCodeGen -lLLVMARMAsmParser -lLLVMARMDesc -lLLVMARMInfo -lLLVMARMAsmPrinter -lLLVMARMUtils -lLLVMAArch64Disassembler -lLLVMAArch64CodeGen -lLLVMAArch64AsmParser -lLLVMAArch64Desc -lLLVMAArch64Info -lLLVMAArch64AsmPrinter -lLLVMAArch64Utils -lLLVMTestingSupport -lLLVMCoverage -lLLVMLineEditor -lLLVMLTO -lLLVMPasses -lLLVMObjCARCOpts -lLLVMOrcJIT -lLLVMObjectYAML -lLLVMFuzzMutate -lLLVMInterpreter -lLLVMWindowsManifest -lLLVMMIRParser -lLLVMLibDriver -lLLVMX86Disassembler -lLLVMX86AsmParser -lLLVMX86CodeGen -lLLVMGlobalISel -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMCodeGen -lLLVMX86Desc -lLLVMMCDisassembler -lLLVMX86Info -lLLVMX86AsmPrinter -lLLVMX86Utils -lLLVMMCJIT -lLLVMExecutionEngine -lLLVMTarget -lLLVMRuntimeDyld -lgtest_main -lgtest -lLLVMCoroutines -lLLVMipo -lLLVMInstrumentation -lLLVMVectorize -lLLVMScalarOpts -lLLVMLinker -lLLVMIRReader -lLLVMAsmParser -lLLVMInstCombine -lLLVMTransformUtils -lLLVMBitWriter -lLLVMAnalysis -lLLVMProfileData -lLLVMSymbolize -lLLVMDebugInfoPDB -lLLVMDebugInfoCodeView -lLLVMDebugInfoMSF -lLLVMDebugInfoDWARF -lLLVMDlltoolDriver -lLLVMOption -lLLVMObject -lLLVMMCParser -lLLVMMC -lLLVMBitReader -lLLVMCore -lLLVMBinaryFormat -lLLVMSupport -lLLVMDemangle"
show_components () { components="aarch64 aarch64asmparser aarch64asmprinter aarch64codegen aarch64desc aarch64disassembler aarch64info aarch64utils all all-targets analysis arm armasmparser armasmprinter armcodegen armdesc armdisassembler arminfo armutils asmparser asmprinter binaryformat bitreader bitwriter codegen core coroutines coverage debuginfocodeview debuginfodwarf debuginfomsf debuginfopdb demangle dlltooldriver engine executionengine fuzzmutate globalisel gtest gtest_main instcombine instrumentation interpreter ipo irreader libdriver lineeditor linker lto mc mcdisassembler mcjit mcparser mirparser native nativecodegen objcarcopts object objectyaml option orcjit passes profiledata runtimedyld scalaropts selectiondag support symbolize tablegen target testingsupport transformutils vectorize windowsmanifest x86 x86asmparser x86asmprinter x86codegen x86desc x86disassembler x86info x86utils"
if [ "$arch" == "x86_64" -o "$arch" == "i686" ]; then arch="x86"; fi
components="all all-targets analysis $arch ${arch}asmparser ${arch}asmprinter ${arch}codegen ${arch}desc"
components="$components ${arch}disassembler ${arch}info asmparser asmprinter bitreader bitwriter codegen"
components="$components core coroutines coverage debuginfocodeview debuginfodwarf debuginfomsf debuginfopdb"
components="$components demangle engine executionengine globalisel instcombine instrumentation interpreter"
components="$components ipo irreader libdriver lineeditor linker lto mc mcdisassembler mcjit mcparser"
components="$components mirparser native nativecodegen objcarcopts object objectyaml option orcjit passes"
components="$components profiledata runtimedyld scalaropts selectiondag support symbolize tablegen target"
components="$components transformutils vectorize"
if [ "$arch" != "arm" ]; then components="$components ${arch}utils"; fi
echo "$components"
}
handle_args () { handle_args () {
case "${1##--}" in case "${1##--}" in
@ -85,7 +73,7 @@ handle_args () {
libs) echo "$LLVM_LIBRARIES";; libs) echo "$LLVM_LIBRARIES";;
libnames) echo "libLLVM-$version.so";; libnames) echo "libLLVM-$version.so";;
libfiles) echo "$LIBFILE";; libfiles) echo "$LIBFILE";;
components) show_components;; components) echo "$components";;
targets-built) echo "@LLVM_TARGETS@";; targets-built) echo "@LLVM_TARGETS@";;
host-target) echo "@LLVM_DEFAULT_TARGET_TRIPLE@";; host-target) echo "@LLVM_DEFAULT_TARGET_TRIPLE@";;
build-mode) echo "Release";; build-mode) echo "Release";;