commit
dddb2b4d4d
@ -4,22 +4,22 @@ TERMUX_PKG_HOMEPAGE=https://github.com/ldc-developers/ldc
|
||||
TERMUX_PKG_DESCRIPTION="D programming language compiler, built with LLVM"
|
||||
TERMUX_PKG_LICENSE="BSD 3-Clause"
|
||||
TERMUX_PKG_VERSION=()
|
||||
TERMUX_PKG_VERSION+=(1.17.0)
|
||||
TERMUX_PKG_VERSION+=(8.0.1) # LLVM version
|
||||
TERMUX_PKG_VERSION+=(2.087.1) # TOOLS version
|
||||
TERMUX_PKG_VERSION+=(1.16.0) # DUB version
|
||||
TERMUX_PKG_REVISION=4
|
||||
TERMUX_PKG_VERSION+=(1.18.0)
|
||||
TERMUX_PKG_VERSION+=(9.0.0) # LLVM version
|
||||
TERMUX_PKG_VERSION+=(2.088.1) # TOOLS version
|
||||
TERMUX_PKG_VERSION+=(8ffc09ed6fb9625837161ffbbda2d926f490196c) # DUB version
|
||||
TERMUX_PKG_REVISION=5
|
||||
|
||||
TERMUX_PKG_SRCURL=(https://github.com/ldc-developers/ldc/releases/download/v${TERMUX_PKG_VERSION}/ldc-${TERMUX_PKG_VERSION}-src.tar.gz
|
||||
https://github.com/ldc-developers/llvm/releases/download/ldc-v${TERMUX_PKG_VERSION[1]}/llvm-${TERMUX_PKG_VERSION[1]}.src.tar.xz
|
||||
https://github.com/dlang/tools/archive/v${TERMUX_PKG_VERSION[2]}.tar.gz
|
||||
https://github.com/dlang/dub/archive/v${TERMUX_PKG_VERSION[3]}.tar.gz
|
||||
https://github.com/dlang/dub/archive/${TERMUX_PKG_VERSION[3]}.tar.gz
|
||||
https://github.com/ldc-developers/ldc/releases/download/v${TERMUX_PKG_VERSION}/ldc2-${TERMUX_PKG_VERSION}-linux-x86_64.tar.xz)
|
||||
TERMUX_PKG_SHA256=(6a2fa91a53d954361832591488241c92adb497842069077425d73c9b9d2c4fa9
|
||||
af469483241e90366f910af32ca3a23e878ad8d2f29c0518811da19e1b6f4454
|
||||
a7cb8b217f2841f1ebe513ac5090d6ef77e03dc72bf2047bf92632c263941810
|
||||
f4291dc053864b81c10dc1e9f9220aee3d4ce7ef735ecdb70de9ecbf6e0aaa5b
|
||||
715adbdd614edf926d5f53bb9f8bfa34d0c828aa40077cb627ce064955fd641d)
|
||||
TERMUX_PKG_SHA256=(aa6b491a4d756942c471778724dbdc7e96026eba4d55720cd66574b9ce42155d
|
||||
0d8d5ebde82843f9b9829494a210c09315c6866c9f8b5df78be35d44943bb1f0
|
||||
e2eb1afe24985096554c971059916bfad1573b85786529c0394009c8db967139
|
||||
e11c4b171c0d26f4d85216aabb1e03d289a5551eda4e2c1bd7b70cf2ca57fd6a
|
||||
04ba1573fb9c728d555340249b8d54cf7d34d249ea185a240be7ab341c764cf5)
|
||||
TERMUX_PKG_DEPENDS="clang, libc++, zlib"
|
||||
TERMUX_PKG_NO_STATICSPLIT=true
|
||||
TERMUX_PKG_HOSTBUILD=true
|
||||
@ -27,15 +27,17 @@ TERMUX_PKG_FORCE_CMAKE=true
|
||||
#These CMake args are only used to configure a patched LLVM
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
|
||||
-DLLVM_ENABLE_PIC=ON
|
||||
-DLLVM_ENABLE_PLUGINS=OFF
|
||||
-DLLVM_BUILD_TOOLS=OFF
|
||||
-DLLVM_BUILD_UTILS=OFF
|
||||
-DCOMPILER_RT_INCLUDE_TESTS=OFF
|
||||
-DLLVM_INCLUDE_TESTS=OFF
|
||||
-DLLVM_ENABLE_TERMINFO=OFF
|
||||
-DLLVM_ENABLE_LIBEDIT=OFF
|
||||
-DLLVM_TABLEGEN=$TERMUX_PKG_HOSTBUILD_DIR/bin/llvm-tblgen
|
||||
-DLLVM_CONFIG_PATH=$TERMUX_PKG_HOSTBUILD_DIR/bin/llvm-config
|
||||
-DPYTHON_EXECUTABLE=$(which python3)
|
||||
-DLLVM_TARGETS_TO_BUILD='AArch64;ARM;X86'
|
||||
-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly
|
||||
-DLLVM_TARGETS_TO_BUILD='AArch64;ARM;WebAssembly;X86'
|
||||
-DCMAKE_INSTALL_PREFIX=$LLVM_INSTALL_DIR
|
||||
"
|
||||
|
||||
@ -50,15 +52,8 @@ termux_step_post_extract_package() {
|
||||
mv tools-${TERMUX_PKG_VERSION[2]} dlang-tools
|
||||
mv dub-${TERMUX_PKG_VERSION[3]} dub
|
||||
|
||||
export LLVM_TRIPLE=${TERMUX_HOST_PLATFORM/-/--}
|
||||
LLVM_TRIPLE=${TERMUX_HOST_PLATFORM/-/--}
|
||||
if [ $TERMUX_ARCH = arm ]; then LLVM_TRIPLE=${LLVM_TRIPLE/arm-/armv7a-}; fi
|
||||
sed $TERMUX_PKG_BUILDER_DIR/llvm-config.in \
|
||||
-e "s|@LLVM_VERSION@|${TERMUX_PKG_VERSION[1]}|g" \
|
||||
-e "s|@LLVM_INSTALL_DIR@|$LLVM_INSTALL_DIR|g" \
|
||||
-e "s|@TERMUX_PKG_SRCDIR@|$TERMUX_PKG_SRCDIR|g" \
|
||||
-e "s|@LLVM_DEFAULT_TARGET_TRIPLE@|$LLVM_TRIPLE|g" \
|
||||
-e "s|@LLVM_TARGETS@|AArch64 ARM X86 WebAssembly|g" > $TERMUX_PKG_BUILDDIR/llvm-config
|
||||
chmod 755 $TERMUX_PKG_BUILDDIR/llvm-config
|
||||
}
|
||||
|
||||
termux_step_host_build() {
|
||||
@ -70,7 +65,8 @@ termux_step_host_build() {
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DLLVM_BUILD_TOOLS=OFF \
|
||||
-DLLVM_BUILD_UTILS=OFF \
|
||||
-DCOMPILER_RT_INCLUDE_TESTS=OFF
|
||||
-DCOMPILER_RT_INCLUDE_TESTS=OFF \
|
||||
-DLLVM_INCLUDE_TESTS=OFF
|
||||
ninja -j $TERMUX_MAKE_PROCESSES llvm-tblgen
|
||||
}
|
||||
|
||||
@ -116,24 +112,33 @@ termux_step_post_configure() {
|
||||
ninja -j $TERMUX_MAKE_PROCESSES install
|
||||
fi
|
||||
|
||||
# Replace non-native llvm-config executable with bash script,
|
||||
# as it is going to be invoked during LDC CMake config.
|
||||
mv ../llvm-config $LLVM_INSTALL_DIR/bin
|
||||
|
||||
# Invoke CMake for LDC:
|
||||
|
||||
TERMUX_PKG_SRCDIR=$OLD_TERMUX_PKG_SRCDIR
|
||||
TERMUX_PKG_BUILDDIR=$OLD_TERMUX_PKG_BUILDDIR
|
||||
cd "$TERMUX_PKG_BUILDDIR"
|
||||
|
||||
export LDC_FLAGS="-mtriple=$LLVM_TRIPLE"
|
||||
# Replace non-native llvm-config executable with bash script,
|
||||
# as it is going to be invoked during LDC CMake config.
|
||||
sed $TERMUX_PKG_SRCDIR/.azure-pipelines/android-llvm-config.in \
|
||||
-e "s|@LLVM_VERSION@|${TERMUX_PKG_VERSION[1]}|g" \
|
||||
-e "s|@LLVM_INSTALL_DIR@|$LLVM_INSTALL_DIR|g" \
|
||||
-e "s|@TERMUX_PKG_SRCDIR@|$TERMUX_PKG_SRCDIR/llvm|g" \
|
||||
-e "s|@LLVM_DEFAULT_TARGET_TRIPLE@|$LLVM_TRIPLE|g" \
|
||||
-e "s|@LLVM_TARGETS@|AArch64 ARM X86 WebAssembly|g" > $LLVM_INSTALL_DIR/bin/llvm-config
|
||||
chmod 755 $LLVM_INSTALL_DIR/bin/llvm-config
|
||||
|
||||
LDC_FLAGS="-mtriple=$LLVM_TRIPLE"
|
||||
if [ $TERMUX_ARCH = arm ]; then LDC_FLAGS="$LDC_FLAGS;-mcpu=cortex-a8"; fi
|
||||
|
||||
export LDC_PATH=$TERMUX_PKG_SRCDIR/ldc2-$TERMUX_PKG_VERSION-linux-x86_64
|
||||
LDC_PATH=$TERMUX_PKG_SRCDIR/ldc2-$TERMUX_PKG_VERSION-linux-x86_64
|
||||
DMD=$LDC_PATH/bin/ldmd2
|
||||
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" -DLLVM_ROOT_DIR=$LLVM_INSTALL_DIR \
|
||||
-DD_COMPILER=$LDC_PATH/bin/ldmd2 \
|
||||
-DCMAKE_INSTALL_PREFIX=$TERMUX_PREFIX"
|
||||
-DD_COMPILER=$DMD \
|
||||
-DCMAKE_INSTALL_PREFIX=$TERMUX_PREFIX \
|
||||
-DLDC_WITH_LLD=OFF \
|
||||
-DD_LINKER_ARGS='-fuse-ld=bfd;-Lldc-build-runtime.tmp/lib;-lphobos2-ldc;-ldruntime-ldc;-Wl,--gc-sections'"
|
||||
|
||||
termux_step_configure_cmake
|
||||
}
|
||||
@ -144,35 +149,31 @@ termux_step_make() {
|
||||
--dFlags="$LDC_FLAGS" --cFlags="$CFLAGS -I$TERMUX_PREFIX/include" \
|
||||
--targetSystem="Android;Linux;UNIX" --ldcSrcDir="$TERMUX_PKG_SRCDIR"
|
||||
|
||||
# Set up ldmd2 for cross-compilation
|
||||
# Set up host ldmd2 for cross-compilation
|
||||
export DFLAGS="${LDC_FLAGS//;/ }"
|
||||
|
||||
# Cross-compile LDC executables (linked against runtime libs above)
|
||||
if test -f build.ninja; then
|
||||
ninja -j $TERMUX_MAKE_PROCESSES ldc2 ldmd2 ldc-build-runtime
|
||||
ninja -j $TERMUX_MAKE_PROCESSES ldc2 ldmd2 ldc-build-runtime ldc-profdata ldc-prune-cache
|
||||
fi
|
||||
|
||||
# Cross-compile dlang tools and dub:
|
||||
|
||||
DMD=$LDC_PATH/bin/ldmd2
|
||||
D_LDFLAGS="-fuse-ld=bfd -L$TERMUX_PKG_BUILDDIR/ldc-build-runtime.tmp/lib -lphobos2-ldc -ldruntime-ldc -Wl,--gc-sections -ldl -lm -fPIE -pie -Wl,-z,nocopyreloc ${LDFLAGS}"
|
||||
if [ $TERMUX_ARCH = arm ]; then D_LDFLAGS="$D_LDFLAGS -Wl,--fix-cortex-a8"; fi
|
||||
# Set up host ldmd2 for cross-compilation & -linking
|
||||
export DFLAGS="$DFLAGS -linker=bfd -L-L$TERMUX_PKG_BUILDDIR/ldc-build-runtime.tmp/lib -Xcc=-pie -L-z -Lnocopyreloc"
|
||||
if [ $TERMUX_ARCH = arm ]; then export DFLAGS="$DFLAGS -L--fix-cortex-a8"; fi
|
||||
|
||||
cd $TERMUX_PKG_SRCDIR/dlang-tools
|
||||
$DMD -w -de -c rdmd.d -of=$TERMUX_PKG_BUILDDIR/bin/rdmd.o
|
||||
$DMD -w -de -c ddemangle.d -of=$TERMUX_PKG_BUILDDIR/bin/ddemangle.o
|
||||
$DMD -w -de -c DustMite/dustmite.d DustMite/splitter.d -of=$TERMUX_PKG_BUILDDIR/bin/dustmite.o
|
||||
$CC $TERMUX_PKG_BUILDDIR/bin/rdmd.o $D_LDFLAGS -o $TERMUX_PKG_BUILDDIR/bin/rdmd
|
||||
$CC $TERMUX_PKG_BUILDDIR/bin/ddemangle.o $D_LDFLAGS -o $TERMUX_PKG_BUILDDIR/bin/ddemangle
|
||||
$CC $TERMUX_PKG_BUILDDIR/bin/dustmite.o $D_LDFLAGS -o $TERMUX_PKG_BUILDDIR/bin/dustmite
|
||||
$DMD -w -de rdmd.d -of=$TERMUX_PKG_BUILDDIR/bin/rdmd
|
||||
$DMD -w -de ddemangle.d -of=$TERMUX_PKG_BUILDDIR/bin/ddemangle
|
||||
$DMD -w -de DustMite/dustmite.d DustMite/splitter.d -of=$TERMUX_PKG_BUILDDIR/bin/dustmite
|
||||
|
||||
cd $TERMUX_PKG_SRCDIR/dub
|
||||
$DMD -O -w -version=DubUseCurl -version=DubApplication -Isource -c @build-files.txt -of=$TERMUX_PKG_BUILDDIR/bin/dub.o
|
||||
$CC $TERMUX_PKG_BUILDDIR/bin/dub.o $D_LDFLAGS -o $TERMUX_PKG_BUILDDIR/bin/dub
|
||||
$DMD -O -w -version=DubUseCurl -version=DubApplication -Isource @build-files.txt -of=$TERMUX_PKG_BUILDDIR/bin/dub
|
||||
}
|
||||
|
||||
termux_step_make_install() {
|
||||
cp bin/{ddemangle,dub,dustmite,ldc-build-runtime,ldc2,ldmd2,rdmd} $TERMUX_PREFIX/bin
|
||||
cp bin/{ddemangle,dub,dustmite,ldc-build-runtime,ldc-profdata,ldc-prune-cache,ldc2,ldmd2,rdmd} $TERMUX_PREFIX/bin
|
||||
cp $TERMUX_PKG_BUILDDIR/ldc-build-runtime.tmp/lib/*.a $TERMUX_PREFIX/lib
|
||||
sed "s|$TERMUX_PREFIX/|%%ldcbinarypath%%/../|g" bin/ldc2_install.conf > $TERMUX_PREFIX/etc/ldc2.conf
|
||||
cat $TERMUX_PREFIX/etc/ldc2.conf
|
||||
|
@ -1,30 +0,0 @@
|
||||
diff --git a/src/rt/sections_android.d b/src/rt/sections_android.d
|
||||
index 33644151..34a2ae5e 100644
|
||||
--- a/src/rt/sections_android.d
|
||||
+++ b/runtime/druntime/src/rt/sections_android.d
|
||||
@@ -76,7 +76,11 @@ void initSections() nothrow @nogc
|
||||
_sections.moduleGroup = ModuleGroup(mbeg[0 .. mend - mbeg]);
|
||||
|
||||
auto pbeg = cast(void*)&_tlsend;
|
||||
- auto pend = cast(void*)&__bss_end__;
|
||||
+ version(X86) auto pend = cast(void*)&_end;
|
||||
+ else version(X86_64) auto pend = cast(void*)& _end;
|
||||
+ else version(ARM) auto pend = cast(void*)& __bss_end__;
|
||||
+ else version(AArch64) auto pend = cast(void*)& __bss_end__;
|
||||
+ else static assert( false, "Android architecture not supported." );
|
||||
// _tlsend is a 32-bit int and may not be 64-bit void*-aligned, so align pbeg.
|
||||
version (D_LP64) pbeg = cast(void*)(cast(size_t)(pbeg + 7) & ~cast(size_t)7);
|
||||
_sections._gcRanges[0] = pbeg[0 .. pend - pbeg];
|
||||
@@ -180,7 +184,11 @@ extern(C)
|
||||
void* __stop_minfo;
|
||||
}
|
||||
|
||||
- size_t __bss_end__;
|
||||
+ version(X86) size_t _end;
|
||||
+ else version(X86_64) size_t _end;
|
||||
+ else version(ARM) size_t __bss_end__;
|
||||
+ else version(AArch64) size_t __bss_end__;
|
||||
+ else static assert( false, "Android architecture not supported." );
|
||||
|
||||
int _tlsstart;
|
||||
int _tlsend;
|
@ -1,170 +0,0 @@
|
||||
diff --git a/src/core/sys/posix/unistd.d b/src/core/sys/posix/unistd.d
|
||||
index 04de7764..418d63d4 100644
|
||||
--- a/src/core/sys/posix/unistd.d
|
||||
+++ b/runtime/druntime/src/core/sys/posix/unistd.d
|
||||
@@ -1342,9 +1342,162 @@ else version (CRuntime_Bionic)
|
||||
enum W_OK = 2;
|
||||
enum X_OK = 1;
|
||||
|
||||
- enum _SC_PAGESIZE = 0x0027;
|
||||
- enum _SC_NPROCESSORS_ONLN = 0x0061;
|
||||
- enum _SC_THREAD_STACK_MIN = 0x004c;
|
||||
+ enum
|
||||
+ {
|
||||
+ _SC_ARG_MAX = 0x0000,
|
||||
+ _SC_BC_BASE_MAX = 0x0001,
|
||||
+ _SC_BC_DIM_MAX = 0x0002,
|
||||
+ _SC_BC_SCALE_MAX = 0x0003,
|
||||
+ _SC_BC_STRING_MAX = 0x0004,
|
||||
+ _SC_CHILD_MAX = 0x0005,
|
||||
+ _SC_CLK_TCK = 0x0006,
|
||||
+ _SC_COLL_WEIGHTS_MAX = 0x0007,
|
||||
+ _SC_EXPR_NEST_MAX = 0x0008,
|
||||
+ _SC_LINE_MAX = 0x0009,
|
||||
+ _SC_NGROUPS_MAX = 0x000a,
|
||||
+ _SC_OPEN_MAX = 0x000b,
|
||||
+ _SC_PASS_MAX = 0x000c,
|
||||
+ _SC_2_C_BIND = 0x000d,
|
||||
+ _SC_2_C_DEV = 0x000e,
|
||||
+ _SC_2_C_VERSION = 0x000f,
|
||||
+ _SC_2_CHAR_TERM = 0x0010,
|
||||
+ _SC_2_FORT_DEV = 0x0011,
|
||||
+ _SC_2_FORT_RUN = 0x0012,
|
||||
+ _SC_2_LOCALEDEF = 0x0013,
|
||||
+ _SC_2_SW_DEV = 0x0014,
|
||||
+ _SC_2_UPE = 0x0015,
|
||||
+ _SC_2_VERSION = 0x0016,
|
||||
+ _SC_JOB_CONTROL = 0x0017,
|
||||
+ _SC_SAVED_IDS = 0x0018,
|
||||
+ _SC_VERSION = 0x0019,
|
||||
+ _SC_RE_DUP_MAX = 0x001a,
|
||||
+ _SC_STREAM_MAX = 0x001b,
|
||||
+ _SC_TZNAME_MAX = 0x001c,
|
||||
+ _SC_XOPEN_CRYPT = 0x001d,
|
||||
+ _SC_XOPEN_ENH_I18N = 0x001e,
|
||||
+ _SC_XOPEN_SHM = 0x001f,
|
||||
+ _SC_XOPEN_VERSION = 0x0020,
|
||||
+ _SC_XOPEN_XCU_VERSION = 0x0021,
|
||||
+ _SC_XOPEN_REALTIME = 0x0022,
|
||||
+ _SC_XOPEN_REALTIME_THREADS = 0x0023,
|
||||
+ _SC_XOPEN_LEGACY = 0x0024,
|
||||
+ _SC_ATEXIT_MAX = 0x0025,
|
||||
+ _SC_IOV_MAX = 0x0026,
|
||||
+ _SC_UIO_MAXIOV = _SC_IOV_MAX,
|
||||
+ _SC_PAGESIZE = 0x0027,
|
||||
+ _SC_PAGE_SIZE = 0x0028,
|
||||
+ _SC_XOPEN_UNIX = 0x0029,
|
||||
+ _SC_XBS5_ILP32_OFF32 = 0x002a,
|
||||
+ _SC_XBS5_ILP32_OFFBIG = 0x002b,
|
||||
+ _SC_XBS5_LP64_OFF64 = 0x002c,
|
||||
+ _SC_XBS5_LPBIG_OFFBIG = 0x002d,
|
||||
+ _SC_AIO_LISTIO_MAX = 0x002e,
|
||||
+ _SC_AIO_MAX = 0x002f,
|
||||
+ _SC_AIO_PRIO_DELTA_MAX = 0x0030,
|
||||
+ _SC_DELAYTIMER_MAX = 0x0031,
|
||||
+ _SC_MQ_OPEN_MAX = 0x0032,
|
||||
+ _SC_MQ_PRIO_MAX = 0x0033,
|
||||
+ _SC_RTSIG_MAX = 0x0034,
|
||||
+ _SC_SEM_NSEMS_MAX = 0x0035,
|
||||
+ _SC_SEM_VALUE_MAX = 0x0036,
|
||||
+ _SC_SIGQUEUE_MAX = 0x0037,
|
||||
+ _SC_TIMER_MAX = 0x0038,
|
||||
+ _SC_ASYNCHRONOUS_IO = 0x0039,
|
||||
+ _SC_FSYNC = 0x003a,
|
||||
+ _SC_MAPPED_FILES = 0x003b,
|
||||
+ _SC_MEMLOCK = 0x003c,
|
||||
+ _SC_MEMLOCK_RANGE = 0x003d,
|
||||
+ _SC_MEMORY_PROTECTION = 0x003e,
|
||||
+ _SC_MESSAGE_PASSING = 0x003f,
|
||||
+ _SC_PRIORITIZED_IO = 0x0040,
|
||||
+ _SC_PRIORITY_SCHEDULING = 0x0041,
|
||||
+ _SC_REALTIME_SIGNALS = 0x0042,
|
||||
+ _SC_SEMAPHORES = 0x0043,
|
||||
+ _SC_SHARED_MEMORY_OBJECTS = 0x0044,
|
||||
+ _SC_SYNCHRONIZED_IO = 0x0045,
|
||||
+ _SC_TIMERS = 0x0046,
|
||||
+ _SC_GETGR_R_SIZE_MAX = 0x0047,
|
||||
+ _SC_GETPW_R_SIZE_MAX = 0x0048,
|
||||
+ _SC_LOGIN_NAME_MAX = 0x0049,
|
||||
+ _SC_THREAD_DESTRUCTOR_ITERATIONS = 0x004a,
|
||||
+ _SC_THREAD_KEYS_MAX = 0x004b,
|
||||
+ _SC_THREAD_STACK_MIN = 0x004c,
|
||||
+ _SC_THREAD_THREADS_MAX = 0x004d,
|
||||
+ _SC_TTY_NAME_MAX = 0x004e,
|
||||
+
|
||||
+ _SC_THREADS = 0x004f,
|
||||
+ _SC_THREAD_ATTR_STACKADDR = 0x0050,
|
||||
+ _SC_THREAD_ATTR_STACKSIZE = 0x0051,
|
||||
+ _SC_THREAD_PRIORITY_SCHEDULING = 0x0052,
|
||||
+ _SC_THREAD_PRIO_INHERIT = 0x0053,
|
||||
+ _SC_THREAD_PRIO_PROTECT = 0x0054,
|
||||
+ _SC_THREAD_SAFE_FUNCTIONS = 0x0055,
|
||||
+
|
||||
+ _SC_NPROCESSORS_CONF = 0x0060,
|
||||
+ _SC_NPROCESSORS_ONLN = 0x0061,
|
||||
+ _SC_PHYS_PAGES = 0x0062,
|
||||
+ _SC_AVPHYS_PAGES = 0x0063,
|
||||
+ _SC_MONOTONIC_CLOCK = 0x0064,
|
||||
+
|
||||
+ _SC_2_PBS = 0x0065,
|
||||
+ _SC_2_PBS_ACCOUNTING = 0x0066,
|
||||
+ _SC_2_PBS_CHECKPOINT = 0x0067,
|
||||
+ _SC_2_PBS_LOCATE = 0x0068,
|
||||
+ _SC_2_PBS_MESSAGE = 0x0069,
|
||||
+ _SC_2_PBS_TRACK = 0x006a,
|
||||
+ _SC_ADVISORY_INFO = 0x006b,
|
||||
+ _SC_BARRIERS = 0x006c,
|
||||
+ _SC_CLOCK_SELECTION = 0x006d,
|
||||
+ _SC_CPUTIME = 0x006e,
|
||||
+ _SC_HOST_NAME_MAX = 0x006f,
|
||||
+ _SC_IPV6 = 0x0070,
|
||||
+ _SC_RAW_SOCKETS = 0x0071,
|
||||
+ _SC_READER_WRITER_LOCKS = 0x0072,
|
||||
+ _SC_REGEXP = 0x0073,
|
||||
+ _SC_SHELL = 0x0074,
|
||||
+ _SC_SPAWN = 0x0075,
|
||||
+ _SC_SPIN_LOCKS = 0x0076,
|
||||
+ _SC_SPORADIC_SERVER = 0x0077,
|
||||
+ _SC_SS_REPL_MAX = 0x0078,
|
||||
+ _SC_SYMLOOP_MAX = 0x0079,
|
||||
+ _SC_THREAD_CPUTIME = 0x007a,
|
||||
+ _SC_THREAD_PROCESS_SHARED = 0x007b,
|
||||
+ _SC_THREAD_ROBUST_PRIO_INHERIT = 0x007c,
|
||||
+ _SC_THREAD_ROBUST_PRIO_PROTECT = 0x007d,
|
||||
+ _SC_THREAD_SPORADIC_SERVER = 0x007e,
|
||||
+ _SC_TIMEOUTS = 0x007f,
|
||||
+ _SC_TRACE = 0x0080,
|
||||
+ _SC_TRACE_EVENT_FILTER = 0x0081,
|
||||
+ _SC_TRACE_EVENT_NAME_MAX = 0x0082,
|
||||
+ _SC_TRACE_INHERIT = 0x0083,
|
||||
+ _SC_TRACE_LOG = 0x0084,
|
||||
+ _SC_TRACE_NAME_MAX = 0x0085,
|
||||
+ _SC_TRACE_SYS_MAX = 0x0086,
|
||||
+ _SC_TRACE_USER_EVENT_MAX = 0x0087,
|
||||
+ _SC_TYPED_MEMORY_OBJECTS = 0x0088,
|
||||
+ _SC_V7_ILP32_OFF32 = 0x0089,
|
||||
+ _SC_V7_ILP32_OFFBIG = 0x008a,
|
||||
+ _SC_V7_LP64_OFF64 = 0x008b,
|
||||
+ _SC_V7_LPBIG_OFFBIG = 0x008c,
|
||||
+ _SC_XOPEN_STREAMS = 0x008d,
|
||||
+ _SC_XOPEN_UUCP = 0x008e,
|
||||
+
|
||||
+ _SC_LEVEL1_ICACHE_SIZE = 0x008f,
|
||||
+ _SC_LEVEL1_ICACHE_ASSOC = 0x0090,
|
||||
+ _SC_LEVEL1_ICACHE_LINESIZE = 0x0091,
|
||||
+ _SC_LEVEL1_DCACHE_SIZE = 0x0092,
|
||||
+ _SC_LEVEL1_DCACHE_ASSOC = 0x0093,
|
||||
+ _SC_LEVEL1_DCACHE_LINESIZE = 0x0094,
|
||||
+ _SC_LEVEL2_CACHE_SIZE = 0x0095,
|
||||
+ _SC_LEVEL2_CACHE_ASSOC = 0x0096,
|
||||
+ _SC_LEVEL2_CACHE_LINESIZE = 0x0097,
|
||||
+ _SC_LEVEL3_CACHE_SIZE = 0x0098,
|
||||
+ _SC_LEVEL3_CACHE_ASSOC = 0x0099,
|
||||
+ _SC_LEVEL3_CACHE_LINESIZE = 0x009a,
|
||||
+ _SC_LEVEL4_CACHE_SIZE = 0x009b,
|
||||
+ _SC_LEVEL4_CACHE_ASSOC = 0x009c,
|
||||
+ _SC_LEVEL4_CACHE_LINESIZE = 0x009d,
|
||||
+ }
|
||||
}
|
||||
else version (Solaris)
|
||||
{
|
@ -1,14 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 336bbdbc..4b9e8c88 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -591,7 +591,8 @@ if(UNIX AND (CMAKE_COMPILER_IS_GNUCXX OR (${CMAKE_CXX_COMPILER_ID} STREQUAL "Cla
|
||||
message(FATAL_ERROR "GDMD currently not supported due to http://bugzilla.gdcproject.org/show_bug.cgi?id=232.")
|
||||
endif()
|
||||
|
||||
- include(ExtractDMDSystemLinker)
|
||||
+ #include(ExtractDMDSystemLinker)
|
||||
+ set(D_LINKER_ARGS "-fuse-ld=bfd;-Lldc-build-runtime.tmp/lib;-lphobos2-ldc;-ldruntime-ldc;-Wl,--gc-sections")
|
||||
message(STATUS "Host D compiler linker program: ${D_LINKER_COMMAND}")
|
||||
message(STATUS "Host D compiler linker flags: ${D_LINKER_ARGS}")
|
||||
list(APPEND LDC_LINKERFLAG_LIST ${D_LINKER_ARGS})
|
@ -1,19 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 336bbdbc..4b9e8c88 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -736,12 +737,12 @@ endif()
|
||||
#
|
||||
# Auxiliary build and test utils.
|
||||
#
|
||||
-add_subdirectory(utils)
|
||||
+#add_subdirectory(utils)
|
||||
|
||||
#
|
||||
# Auxiliary tools.
|
||||
#
|
||||
-add_subdirectory(tools)
|
||||
+#add_subdirectory(tools)
|
||||
|
||||
#
|
||||
# Test and runtime targets. Note that enable_testing() is order-sensitive!
|
@ -1,121 +0,0 @@
|
||||
#!/bin/bash
|
||||
show_help () {
|
||||
echo "usage: llvm-config <OPTION>... [<COMPONENT>...]
|
||||
|
||||
Get various configuration information needed to compile programs which use
|
||||
LLVM. Typically called from 'configure' scripts. Examples:
|
||||
llvm-config --cxxflags
|
||||
llvm-config --ldflags
|
||||
llvm-config --libs engine bcreader scalaropts
|
||||
|
||||
Options:
|
||||
--version Print LLVM version.
|
||||
--prefix Print the installation prefix.
|
||||
--src-root Print the source root LLVM was built from.
|
||||
--obj-root Print the object root used to build LLVM.
|
||||
--bindir Directory containing LLVM executables.
|
||||
--includedir Directory containing LLVM headers.
|
||||
--libdir Directory containing LLVM libraries.
|
||||
--cppflags C preprocessor flags for files that include LLVM headers.
|
||||
--cflags C compiler flags for files that include LLVM headers.
|
||||
--cxxflags C++ compiler flags for files that include LLVM headers.
|
||||
--ldflags Print Linker flags.
|
||||
--system-libs System Libraries needed to link against LLVM components.
|
||||
--libs Libraries needed to link against LLVM components.
|
||||
--libnames Bare library names for in-tree builds.
|
||||
--libfiles Fully qualified library filenames for makefile depends.
|
||||
--components List of all possible components.
|
||||
--targets-built List of all targets currently built.
|
||||
--host-target Target triple used to configure LLVM.
|
||||
--build-mode Print build mode of LLVM tree (e.g. Debug or Release).
|
||||
--assertion-mode Print assertion mode of LLVM tree (ON or OFF).
|
||||
--build-system Print the build system used to build LLVM (always cmake).
|
||||
--has-rtti Print whether or not LLVM was built with rtti (YES or NO).
|
||||
--has-global-isel Print whether or not LLVM was built with global-isel support (YES or NO).
|
||||
--shared-mode Print how the provided components can be collectively linked (\`shared\` or \`static\`).
|
||||
--link-shared Link the components as shared libraries.
|
||||
--link-static Link the component libraries statically.
|
||||
Typical components:
|
||||
all All LLVM libraries (default).
|
||||
engine Either a native JIT or a bitcode interpreter."
|
||||
}
|
||||
|
||||
version=@LLVM_VERSION@
|
||||
prefix=@LLVM_INSTALL_DIR@
|
||||
has_rtti=NO
|
||||
CPPFLAGS="-I@TERMUX_PKG_SRCDIR@/llvm/include -I${prefix}/include -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS"
|
||||
CFLAGS="${CPPFLAGS} ${CFLAGS} -fPIC -Werror=date-time -Wall -W -Wno-unused-parameter -Wwrite-strings -Wmissing-field-initializers -pedantic \
|
||||
-Wno-long-long -Wcovered-switch-default -Wdelete-non-virtual-dtor -Wstring-conversion \
|
||||
-ffunction-sections -fdata-sections -Os -DNDEBUG -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
|
||||
CXXFLAGS="${CFLAGS} -fvisibility-inlines-hidden -Wcast-qual -Wnon-virtual-dtor -std=c++11 -fno-exceptions"
|
||||
if [ "$has_rtti" != "YES" ]; then CXXFLAGS="$CXXFLAGS -fno-rtti"; fi
|
||||
LDFLAGS="-L${prefix}/lib"
|
||||
LIBFILE="${prefix}/lib/libLLVM-$version.so"
|
||||
|
||||
components="aarch64 aarch64asmparser aarch64asmprinter aarch64codegen aarch64desc aarch64disassembler \
|
||||
aarch64info aarch64utils aggressiveinstcombine 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 mca mcdisassembler mcjit mcparser mirparser \
|
||||
native nativecodegen objcarcopts object objectyaml option optremarks orcjit passes profiledata runtimedyld \
|
||||
scalaropts selectiondag support symbolize tablegen target testingsupport textapi transformutils vectorize \
|
||||
webassembly webassemblyasmparser webassemblyasmprinter webassemblycodegen webassemblydesc \
|
||||
webassemblydisassembler webassemblyinfo windowsmanifest x86 x86asmparser x86asmprinter x86codegen x86desc \
|
||||
x86disassembler x86info x86utils xray"
|
||||
static_libs="-lLLVMSymbolize -lLLVMDebugInfoPDB -lLLVMDebugInfoDWARF -lLLVMCoverage -lLLVMDlltoolDriver \
|
||||
-lLLVMLineEditor -lLLVMOrcJIT -lLLVMMCA -lLLVMWindowsManifest -lLLVMTextAPI \
|
||||
-lLLVMFuzzMutate -lLLVMMCJIT -lLLVMCoroutines -lLLVMLTO -lLLVMPasses -lLLVMObjCARCOpts -lLLVMipo \
|
||||
-lLLVMInstrumentation -lLLVMVectorize -lLLVMLinker -lLLVMIRReader -lLLVMMIRParser -lLLVMAsmParser \
|
||||
-lLLVMTableGen -lLLVMXRay -lLLVMWebAssemblyDisassembler -lLLVMWebAssemblyCodeGen -lLLVMWebAssemblyDesc \
|
||||
-lLLVMWebAssemblyAsmPrinter -lLLVMWebAssemblyAsmParser -lLLVMWebAssemblyInfo -lLLVMX86Disassembler \
|
||||
-lLLVMX86AsmParser -lLLVMX86CodeGen -lLLVMX86Desc -lLLVMX86Info -lLLVMX86AsmPrinter -lLLVMX86Utils \
|
||||
-lLLVMARMDisassembler -lLLVMARMCodeGen -lLLVMARMAsmParser -lLLVMARMDesc -lLLVMARMInfo -lLLVMARMAsmPrinter \
|
||||
-lLLVMARMUtils -lLLVMAArch64Disassembler -lLLVMMCDisassembler -lLLVMAArch64CodeGen -lLLVMGlobalISel \
|
||||
-lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMAArch64AsmParser -lLLVMAArch64Desc -lLLVMAArch64Info \
|
||||
-lLLVMAArch64AsmPrinter -lLLVMAArch64Utils -lLLVMObjectYAML -lLLVMLibDriver -lLLVMOption -lLLVMOptRemarks \
|
||||
-lLLVMInterpreter -lLLVMExecutionEngine -lLLVMRuntimeDyld -lLLVMCodeGen -lLLVMTarget -lLLVMScalarOpts \
|
||||
-lLLVMInstCombine -lLLVMAggressiveInstCombine -lLLVMTransformUtils -lLLVMBitWriter -lLLVMAnalysis \
|
||||
-lLLVMProfileData -lLLVMObject -lLLVMMCParser -lLLVMMC -lLLVMDebugInfoCodeView -lLLVMDebugInfoMSF \
|
||||
-lLLVMBitReader -lLLVMCore -lLLVMBinaryFormat -lLLVMSupport -lLLVMDemangle"
|
||||
shared_libs="-lLLVM-$version"
|
||||
libs=$shared_libs
|
||||
handle_args () {
|
||||
if [ "${1:0:2}" != "--" ]; then return 0; fi
|
||||
case "${1:2}" in
|
||||
link-shared) libs=$shared_libs ;;
|
||||
link-static) libs=$static_libs ;;
|
||||
version) echo "$version";;
|
||||
prefix) echo "$prefix";;
|
||||
src-root) echo "@TERMUX_PKG_SRCDIR@";;
|
||||
obj-root) echo "$prefix";;
|
||||
bindir) echo "$prefix/bin";;
|
||||
includedir) echo "$prefix/include";;
|
||||
libdir) echo "$prefix/lib";;
|
||||
cppflags) echo "$CPPFLAGS";;
|
||||
cflags) echo "$CFLAGS";;
|
||||
cxxflags) echo "$CXXFLAGS";;
|
||||
ldflags) echo "$LDFLAGS";;
|
||||
system-libs) echo "-lc -ldl -lz -lm";;
|
||||
libs) echo "$static_libs";;
|
||||
libnames) echo "libLLVM-$version.so";;
|
||||
libfiles) echo "$LIBFILE";;
|
||||
components) echo "$components";;
|
||||
targets-built) echo "@LLVM_TARGETS@";;
|
||||
host-target) echo "@LLVM_DEFAULT_TARGET_TRIPLE@";;
|
||||
build-mode) echo "Release";;
|
||||
assertion-mode) echo "OFF";;
|
||||
build-system) echo "cmake";;
|
||||
has-rtti) echo "$has_rtti";;
|
||||
has-global-isel) echo "ON";;
|
||||
shared-mode) echo "static";;
|
||||
cmakedir) echo "$prefix/lib/cmake/llvm";;
|
||||
*) echo "Unsupported llvm-config switch: ${1}" >&2; exit 1;;
|
||||
esac
|
||||
}
|
||||
|
||||
if [ "$#" -eq 0 ]; then
|
||||
show_help >&2
|
||||
else
|
||||
for arg in $@; do handle_args $arg; done
|
||||
fi
|
Loading…
Reference in New Issue
Block a user