Adaptation for latest MinGW64 (#18699)

Signed-off-by: Ji Bin <matrixji@live.com>

Signed-off-by: Ji Bin <matrixji@live.com>
pull/18823/head
Ji Bin 2022-08-25 10:56:53 +08:00 committed by GitHub
parent 8fe3895485
commit f3c755602b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 6 deletions

View File

@ -131,7 +131,7 @@ jobs:
key: ${{ runner.os }}-ccache-${{ hashFiles('internal/core/**') }}
restore-keys: ${{ runner.os }}-ccache-
- name: Configure Toolchain
uses: msys2/setup-msys2@v2.10.3
uses: msys2/setup-msys2@v2.12.0
with:
msystem: mingw64
- name: Install Deps
@ -147,4 +147,5 @@ jobs:
CCACHE_MAXSIZE: 2G
CCACHE_DIR: ${{ github.workspace }}/.ccache
run: |
go version
mingw32-make verifiers build-go

View File

@ -50,6 +50,14 @@ else ()
message(FATAL_ERROR "Unsupported platform!" )
endif ()
if (CMAKE_COMPILER_IS_GNUCC)
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 11.99)
# ignore deprecated declarations for gcc>=12
# TODO: this workaround may removed when protobuf upgraded
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=deprecated-declarations")
endif ()
endif ()
set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake" )
include( Utils )

View File

@ -23,18 +23,19 @@ pacmanInstall()
mingw-w64-x86_64-python2 \
mingw-w64-x86_64-diffutils \
mingw-w64-x86_64-arrow \
mingw-w64-x86_64-go \
mingw-w64-x86_64-rocksdb
mingw-w64-x86_64-go
pacman -U --noconfirm \
https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-rocksdb-6.26.1-1-any.pkg.tar.zst
}
updateKey()
{
pacman-key --refresh-keys
pacman-key --refresh-keys
}
pacmanInstall || {
updateKey
pacmanInstall
updateKey
pacmanInstall
}