Skip to content

Commit 5efa435

Browse files
committed
Fix Cygwin toolchain build to be compatible with upstream workflow
1 parent e8aad8c commit 5efa435

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

.github/scripts/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ fi
5151

5252
$ROOT_PATH/.github/scripts/toolchain/build-gcc.sh
5353

54-
if [[ "$PLATFORM" =~ (mingw|cygwin) ]]; then
54+
if [[ "$PLATFORM" =~ mingw ]]; then
5555
$ROOT_PATH/.github/scripts/toolchain/build-mingw.sh
5656
fi
5757
if [[ "$PLATFORM" =~ cygwin ]]; then

.github/scripts/toolchain/build-mingw-headers.sh

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,15 @@ if [[ "$RUN_CONFIG" = 1 ]] || [[ ! -f "$MINGW_HEADERS_BUILD_PATH/Makefile" ]]; t
2121
TARGET_OPTIONS="$TARGET_OPTIONS \
2222
--enable-w32api"
2323
;;
24-
*mingw*)
25-
TARGET_OPTIONS="$TARGET_OPTIONS \
26-
--enable-sdk=all"
27-
;;
2824
esac
2925

30-
case "$CRT" in
31-
ucrt)
26+
case "$PLATFORM-$CRT" in
27+
*mingw*-ucrt)
3228
TARGET_OPTIONS="$TARGET_OPTIONS \
3329
--with-default-win32-winnt=0x603 \
3430
--with-default-msvcrt=ucrt"
3531
;;
36-
msvcrt)
32+
*mingw*-msvcrt)
3733
TARGET_OPTIONS="$TARGET_OPTIONS \
3834
--with-default-win32-winnt=0x601 \
3935
--with-default-msvcrt=msvcrt"
@@ -44,6 +40,7 @@ if [[ "$RUN_CONFIG" = 1 ]] || [[ ! -f "$MINGW_HEADERS_BUILD_PATH/Makefile" ]]; t
4440
--prefix=$TOOLCHAIN_PATH/$TARGET \
4541
--build=$BUILD \
4642
--host=$TARGET \
43+
--enable-sdk=all \
4744
$HOST_OPTIONS \
4845
$TARGET_OPTIONS
4946
echo "::endgroup::"

.github/workflows/advanced.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ jobs:
320320
.github/scripts/toolchain/build-gcc.sh
321321
322322
- name: Build MinGW
323-
if: ${{ steps.cache-toolchain.outputs.cache-hit != 'true' && matrix.platform != 'pc-linux-gnu' }}
323+
if: ${{ steps.cache-toolchain.outputs.cache-hit != 'true' && matrix.platform == 'w64-mingw32' }}
324324
run: |
325325
.github/scripts/toolchain/build-mingw.sh
326326

0 commit comments

Comments
 (0)