mirror of
https://github.com/termux/termux-packages.git
synced 2024-12-04 18:45:52 +00:00
9e90d1b31a
Some packages have issues with parallel builds and need to set TERMUX_MAKE_PROCESSES=1. All other build variables that package recipes set are prefixed with TERMUX_PKG, use that for MAKE_PROCESSES as well for consistency. %ci:no-build
70 lines
2.5 KiB
Diff
70 lines
2.5 KiB
Diff
--- a/build
|
|
+++ b/build
|
|
@@ -24,7 +24,7 @@
|
|
# First build the libraries for Zig to link against, as well as native `llvm-tblgen`.
|
|
mkdir -p "$ROOTDIR/out/build-llvm-host"
|
|
cd "$ROOTDIR/out/build-llvm-host"
|
|
-cmake "$ROOTDIR/llvm" \
|
|
+cmake -G Ninja "$ROOTDIR/llvm" \
|
|
-DCMAKE_INSTALL_PREFIX="$ROOTDIR/out/host" \
|
|
-DCMAKE_PREFIX_PATH="$ROOTDIR/out/host" \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
@@ -51,18 +51,18 @@
|
|
-DCLANG_TOOL_ARCMT_TEST_BUILD=OFF \
|
|
-DCLANG_TOOL_C_ARCMT_TEST_BUILD=OFF \
|
|
-DCLANG_TOOL_LIBCLANG_BUILD=OFF
|
|
-cmake --build . --target install
|
|
+ninja -j"${TERMUX_PKG_MAKE_PROCESSES}" install
|
|
|
|
# Now we build Zig, still with system C/C++ compiler, linking against LLVM,
|
|
# Clang, LLD we just built from source.
|
|
mkdir -p "$ROOTDIR/out/build-zig-host"
|
|
cd "$ROOTDIR/out/build-zig-host"
|
|
-cmake "$ROOTDIR/zig" \
|
|
+cmake -G Ninja "$ROOTDIR/zig" \
|
|
-DCMAKE_INSTALL_PREFIX="$ROOTDIR/out/host" \
|
|
-DCMAKE_PREFIX_PATH="$ROOTDIR/out/host" \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DZIG_VERSION="$ZIG_VERSION"
|
|
-cmake --build . --target install
|
|
+ninja -j"${TERMUX_PKG_MAKE_PROCESSES}" install
|
|
|
|
# Now we have Zig as a cross compiler.
|
|
ZIG="$ROOTDIR/out/host/bin/zig"
|
|
@@ -71,7 +71,7 @@
|
|
# the final zig binary to have zlib support enabled.
|
|
mkdir -p "$ROOTDIR/out/build-zlib-$TARGET-$MCPU"
|
|
cd "$ROOTDIR/out/build-zlib-$TARGET-$MCPU"
|
|
-cmake "$ROOTDIR/zlib" \
|
|
+cmake -G Ninja "$ROOTDIR/zlib" \
|
|
-DCMAKE_INSTALL_PREFIX="$ROOTDIR/out/$TARGET-$MCPU" \
|
|
-DCMAKE_PREFIX_PATH="$ROOTDIR/out/$TARGET-$MCPU" \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
@@ -83,7 +83,7 @@
|
|
-DCMAKE_RC_COMPILER="$ROOTDIR/out/host/bin/llvm-rc" \
|
|
-DCMAKE_AR="$ROOTDIR/out/host/bin/llvm-ar" \
|
|
-DCMAKE_RANLIB="$ROOTDIR/out/host/bin/llvm-ranlib"
|
|
-cmake --build . --target install
|
|
+ninja -j"${TERMUX_PKG_MAKE_PROCESSES}" install
|
|
|
|
# Same deal for zstd.
|
|
# The build system for zstd is whack so I just put all the files here.
|
|
@@ -133,7 +133,7 @@
|
|
# Rebuild LLVM with Zig.
|
|
mkdir -p "$ROOTDIR/out/build-llvm-$TARGET-$MCPU"
|
|
cd "$ROOTDIR/out/build-llvm-$TARGET-$MCPU"
|
|
-cmake "$ROOTDIR/llvm" \
|
|
+cmake -G Ninja "$ROOTDIR/llvm" \
|
|
-DCMAKE_INSTALL_PREFIX="$ROOTDIR/out/$TARGET-$MCPU" \
|
|
-DCMAKE_PREFIX_PATH="$ROOTDIR/out/$TARGET-$MCPU" \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
@@ -186,7 +186,7 @@
|
|
-DCLANG_TOOL_LIBCLANG_BUILD=OFF \
|
|
-DLIBCLANG_BUILD_STATIC=ON \
|
|
-DLLD_BUILD_TOOLS=OFF
|
|
-cmake --build . --target install
|
|
+ninja -j"${TERMUX_PKG_MAKE_PROCESSES}" install
|
|
|
|
# Finally, we can cross compile Zig itself, with Zig.
|
|
cd "$ROOTDIR/zig"
|