initial zefie commit
Builds / prepare (push) Canceled after 0s
Builds / linux-stage1 (push) Canceled after 0s
Builds / linux-profile (push) Canceled after 0s
Builds / linux (push) Canceled after 0s
Builds / linux-cross-aarch64 (push) Canceled after 0s
Builds / linux-asserts (push) Canceled after 0s
Builds / macos-stage1 (push) Canceled after 0s
Builds / macos (push) Canceled after 0s
Builds / msys2 (clang64) (push) Canceled after 0s
Builds / linux-cross-windows (aarch64, ucrt) (push) Canceled after 0s
Builds / linux-cross-windows (armv7, ucrt) (push) Canceled after 0s
Builds / linux-cross-windows (i686, ucrt) (push) Canceled after 0s
Builds / linux-cross-windows (x86_64, ucrt) (push) Canceled after 0s
Builds / test-toolchain (aarch64) (push) Canceled after 0s
Builds / test-toolchain (i686) (push) Canceled after 0s
Builds / test-toolchain (x86_64) (push) Canceled after 0s
Builds / test-libcxx (aarch64, aarch64) (push) Canceled after 0s
Builds / test-libcxx (x86_64, i686) (push) Canceled after 0s
Builds / test-libcxx (x86_64, x86_64) (push) Canceled after 0s
Builds / test-openmp (aarch64) (push) Canceled after 0s
Builds / test-openmp (arm64ec) (push) Canceled after 0s
Builds / test-openmp (i686, <nil>) (push) Canceled after 0s
Builds / test-openmp (x86_64, -m64) (push) Canceled after 0s
Builds / test-compiler-rt (aarch64) (push) Canceled after 0s
Builds / test-compiler-rt (i686) (push) Canceled after 0s
Builds / test-compiler-rt (x86_64) (push) Canceled after 0s
Builds / linux-test-cross-build-ffmpeg (aarch64) (push) Canceled after 0s
Builds / linux-test-cross-build-ffmpeg (armv7) (push) Canceled after 0s
Builds / linux-test-cross-build-ffmpeg (i686) (push) Canceled after 0s
Builds / linux-test-cross-build-ffmpeg (x86_64) (push) Canceled after 0s
Builds / test-ffmpeg (push) Canceled after 0s
Builds / upload-nightly (push) Canceled after 0s

This commit is contained in:
zefie committed 2026-11-04 18:15:27 -05:00
1 parent 70bc9a60ee
commit dc8b55b2b7
11 files changed
+810

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
prefix=/opt/mingw32-xp/i686-w64-mingw32
exec_prefix=${prefix}
bindir=${exec_prefix}/bin
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: bzip2
Description: Lossless, block-sorting data compression
Version: 1.0.8
Libs: -L${libdir} -lbz2
Cflags: -I${includedir}
+184
View File
@@ -0,0 +1,184 @@
#!/usr/bin/env bash
set -e
# All LLVM-mingw targets you want to build for
TARGETS=(
aarch64-w64-mingw32
armv7-w64-mingw32
i686-w64-mingw32
x86_64-w64-mingw32
)
if [[ "${1}" == "--noinstall" ]]; then
export NOINSTALL=1
shift
fi
# Detect build system, preferring CMake
detect_build_system() {
if [[ -f meson.build ]]; then
echo "meson"
elif [[ -f CMakeLists.txt ]]; then
echo "cmake"
elif [[ -f configure ]]; then
echo "autotools"
else
echo "unknown"
fi
}
# Configure environment for a given target
setup_env() {
export TARGET="${1}"
export CC="${TARGET}-clang"
export CXX="${TARGET}-clang++"
export RC="${TARGET}-windres"
export AR="${TARGET}-ar"
export RANLIB="${TARGET}-ranlib"
export STRIP="${TARGET}-strip"
export OBJCOPY="${TARGET}-objcopy"
export OBJDUMP="${TARGET}-objdump"
export PKG_CONFIG="/usr/bin/pkgconf"
export PKG_CONFIG_LIBDIR="${TOOLCHAIN_PREFIX}/${TARGET}/lib/pkgconfig:${TOOLCHAIN_PREFIX}/${TARGET}/share/pkgconfig"
export PKG_CONFIG_SYSROOT_DIR="${TOOLCHAIN_PREFIX}/${TARGET}"
export RCFLAGS="--target=${TARGET} -D_WIN32=1 -I/opt/llvm-mingw/${TARGET}/include"
export CFLAGS="--target=${TARGET}"
case "$TARGET" in
i686-w64-mingw32)
export CFLAGS="${CFLAGS} -march=pentium4"
export CXXFLAGS="${CFLAGS}"
;;
armv7-w64-mingw32)
export CFLAGS="${CFLAGS} -mfpu=neon"
export CXXFLAGS="${CFLAGS}"
;;
x86_64-w64-mingw32)
export CFLAGS="${CFLAGS} -march=x86-64 -mtune=znver4"
export CXXFLAGS="${CFLAGS}"
;;
aarch64-w64-mingw32)
export CXXFLAGS="${CFLAGS}"
;;
*)
unset CFLAGS
unset CXXFLAGS
;;
esac
}
# Build using Autotools
build_autotools() {
mkdir -p build-$TARGET
pushd build-$TARGET
../configure \
--host="$TARGET" \
--build="$(../config.guess)" \
--prefix="${TOOLCHAIN_PREFIX}/${TARGET}" \
CC="${CC}" CXX="${CXX}" RC="$RC" \
"${@}" || exit 1
make -j$(nproc) || exit 1
if [ -z ${NOINSTALL} ]; then
make install || exit 1
fi
popd
}
# Build using CMake
build_cmake() {
mkdir -p build-$TARGET
pushd build-$TARGET
cmake .. \
-DCMAKE_SYSTEM_NAME=Windows \
-DCMAKE_C_COMPILER="${CC}" \
-DCMAKE_CXX_COMPILER="${CXX}" \
-DCMAKE_RC_COMPILER="${RC}" \
-DCMAKE_INSTALL_PREFIX="${TOOLCHAIN_PREFIX}/${TARGET}" \
-DCMAKE_TOOLCHAIN_FILE="${TOOLCHAIN_PREFIX}/${TARGET}/llvm-mingw.cmake" \
-DCMAKE_BUILD_TYPE=Release "${@}" || exit 1
cmake --build . --config Release -- -j$(nproc) || exit 1
if [ -z ${NOINSTALL} ]; then
cmake --install . || exit 1
fi
popd
}
# Meson
build_meson() {
mkdir -p build-$TARGET
pushd build-$TARGET
meson setup .. \
--cross-file <(cat <<EOF
[binaries]
c = '$TARGET-clang'
cpp = '$TARGET-clang++'
ar = '$TARGET-ar'
ld = '$TARGET-ld'
strip = '$TARGET-strip'
windres = '$TARGET-windres'
pkgconfig = '/usr/bin/pkgconf'
[host_machine]
system = 'windows'
cpu_family = '$(echo $TARGET | cut -d- -f1)'
cpu = '$(echo $TARGET | cut -d- -f1)'
endian = 'little'
EOF
) \
--prefix="${TOOLCHAIN_PREFIX}/${TARGET}" \
--buildtype=release "${@}"
ninja -j$(nproc)
if [ -z ${NOINSTALL} ]; then
ninja install
fi
popd
}
# Main loop
if [ "${1}" == "--autotools" ]; then
BUILD_SYSTEM=autotools
shift
elif [ "${1}" == "--cmake" ]; then
BUILD_SYSTEM=cmake
shift
else
BUILD_SYSTEM=$(detect_build_system)
fi
if [[ "${1}" == "--target" ]] && [[ -n "${2}" ]]; then
shift
TARGET="${1}"
shift
setup_env "${TARGET}"
"${@}"
exit $?
else
if [[ "$BUILD_SYSTEM" == "unknown" ]]; then
echo "Error: No configure script or CMakeLists.txt found. Use --target to execute custom commands."
exit 1
fi
fi
for TARGET in "${TARGETS[@]}"; do
echo "=============================="
echo " Building for ${TARGET}"
echo "=============================="
setup_env "${TARGET}"
case "$BUILD_SYSTEM" in
autotools) build_autotools "${@}" ;;
cmake) build_cmake "${@}" ;;
meson) build_meson "${@}" ;;
esac
rm -rf "${WRAPDIR}"
done