Skip to content

Commit

Permalink
Add other build variants
Browse files Browse the repository at this point in the history
  • Loading branch information
Blackhex committed Nov 7, 2023
1 parent 276555e commit 7eb7cdf
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 20 deletions.
21 changes: 13 additions & 8 deletions .github/scripts/build-mingw-crt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ BUILD_PATH=${BUILD_PATH:-$PWD/build-$TARGET}
BUILD_MAKE_OPTIONS=-j$(nproc)
INSTALL_PATH=${INSTALL_PATH:-~/cross}

case "$TARGET" in
x86_64*)
MINGW_CONF="--disable-lib32 --enable-lib64 --disable-libarm32 --disable-libarm64"
;;
aarch64*)
MINGW_CONF="--disable-lib32 --disable-lib64 --disable-libarm32 --enable-libarm64"
;;
esac

export PATH=$INSTALL_PATH/bin:$PATH

set -e # exit on error
Expand All @@ -18,16 +27,12 @@ mkdir -p $BUILD_PATH/mingw

cd $BUILD_PATH/mingw
../../code/$MINGW_VERSION/mingw-w64-crt/configure \
--build=x86_64-linux-gnu \
--with-sysroot=$INSTALL_PATH \
--prefix=$INSTALL_PATH/$TARGET \
--build=x86_64-linux-gnu \
--host=$TARGET \
--enable-libarm64 \
--disable-lib32 \
--disable-lib64 \
--disable-libarm32 \
--disable-shared \
--with-default-msvcrt=msvcrt
--with-sysroot=$INSTALL_PATH \
--with-default-msvcrt=msvcrt \
$MINGW_CONF

echo "::endgroup::"

Expand Down
15 changes: 12 additions & 3 deletions .github/scripts/build-mingw-headers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ BUILD_PATH=${BUILD_PATH:-$PWD/build-$TARGET}
BUILD_MAKE_OPTIONS=-j$(nproc)
INSTALL_PATH=${INSTALL_PATH:-~/cross}

case "$TARGET" in
x86_64*)
MINGW_CONF="--disable-lib32 --enable-lib64 --disable-libarm32 --disable-libarm64"
;;
aarch64*)
MINGW_CONF="--disable-lib32 --disable-lib64 --disable-libarm32 --enable-libarm64"
;;
esac

export PATH=$INSTALL_PATH/bin:$PATH

set -e # exit on error
Expand All @@ -18,9 +27,9 @@ mkdir -p $BUILD_PATH/mingw-headers

cd $BUILD_PATH/mingw-headers
../../code/$MINGW_VERSION/mingw-w64-headers/configure \
--prefix=$INSTALL_PATH/$TARGET \
--host=$TARGET \
--with-default-msvcrt=msvcrt
--prefix=$INSTALL_PATH/$TARGET \
--host=$TARGET \
--with-default-msvcrt=msvcrt

echo "::endgroup::"

Expand Down
17 changes: 11 additions & 6 deletions .github/scripts/build-mingw.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ BUILD_PATH=${BUILD_PATH:-$PWD/build-$TARGET}
BUILD_MAKE_OPTIONS=-j$(nproc)
INSTALL_PATH=${INSTALL_PATH:-~/cross}

case "$TARGET" in
x86_64*)
MINGW_CONF="--disable-lib32 --enable-lib64 --disable-libarm32 --disable-libarm64"
;;
aarch64*)
MINGW_CONF="--disable-lib32 --disable-lib64 --disable-libarm32 --enable-libarm64"
;;
esac

export PATH=$INSTALL_PATH/bin:$PATH

set -e # exit on error
Expand All @@ -18,13 +27,9 @@ cd $BUILD_PATH/mingw
../../code/$MINGW_VERSION/configure \
--prefix=$INSTALL_PATH/$TARGET \
--host=$TARGET \
--enable-libarm64 \
--disable-lib32 \
--disable-lib64 \
--disable-libarm32 \
--disable-shared \
--with-libraries=libmangle,pseh,winpthreads \
--with-default-msvcrt=msvcrt
--with-default-msvcrt=msvcrt \
$MINGW_CONF

echo "::endgroup::"

Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/advanced.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ jobs:
build-toolchain:
strategy:
matrix:
target: [aarch64-w64-mingw32]
crt: [msvcrt]

target: [aarch64-w64-mingw32, x86_64-w64-mingw32, aarch64-pc-linux]
crt: [msvcrt, ucrt]
exclude:
- target: aarch64-pc-linux
crt: msvcrt
runs-on: ubuntu-latest

env:
Expand Down

0 comments on commit 7eb7cdf

Please sign in to comment.