From ce36889338ffc488ab65c6eb1668250ce42afdec Mon Sep 17 00:00:00 2001 From: scawful Date: Tue, 14 Oct 2025 16:21:00 -0400 Subject: [PATCH] refactor(ci): enhance Protobuf static linking in workflows - Updated CI and release workflows to include additional flags for static linking of Protobuf, ensuring consistent C and C++ compilation flags. - Added Protobuf import prefix and suffix options to improve library handling. Benefits: - Improves build stability and compatibility by leveraging static linking for Protobuf, enhancing overall CI performance. --- .github/workflows/ci.yml | 6 ++++-- .github/workflows/release.yml | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b714d0ca..78aae223 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -421,10 +421,12 @@ jobs: -DVCPKG_MANIFEST_MODE=ON ` -DVCPKG_INSTALL_OPTIONS="--debug" ` -DOPENSSL_NO_ASM=ON ` - -DCMAKE_CXX_FLAGS="/Dgoogle_protobuf_undef_DWORD=1 /D__PRFCHWINTRIN_H /DPROTOBUF_USE_DLLS=0" ` - -DCMAKE_C_FLAGS="/Dgoogle_protobuf_undef_DWORD=1 /D__PRFCHWINTRIN_H /DPROTOBUF_USE_DLLS=0" ` + -DCMAKE_CXX_FLAGS="/Dgoogle_protobuf_undef_DWORD=1 /D__PRFCHWINTRIN_H /DPROTOBUF_USE_DLLS=0 /DPROTOBUF_STATIC_DEFINE" ` + -DCMAKE_C_FLAGS="/Dgoogle_protobuf_undef_DWORD=1 /D__PRFCHWINTRIN_H /DPROTOBUF_USE_DLLS=0 /DPROTOBUF_STATIC_DEFINE" ` -DProtobuf_USE_STATIC_LIBS=ON ` -DProtobuf_MSVC_STATIC_RUNTIME=ON ` + -DProtobuf_IMPORT_PREFIX="" ` + -DProtobuf_IMPORT_SUFFIX="" ` -DYAZE_BUILD_TESTS=ON ` -DYAZE_BUILD_EMU=ON ` -DYAZE_ENABLE_ROM_TESTS=OFF ` diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e899b647..44ba830e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -430,10 +430,12 @@ jobs: -DVCPKG_TARGET_TRIPLET=x64-windows-static ` -DVCPKG_MANIFEST_MODE=ON ` -DOPENSSL_NO_ASM=ON ` - -DCMAKE_CXX_FLAGS="/Dgoogle_protobuf_undef_DWORD=1 /D__PRFCHWINTRIN_H /DPROTOBUF_USE_DLLS=0" ` - -DCMAKE_C_FLAGS="/Dgoogle_protobuf_undef_DWORD=1 /D__PRFCHWINTRIN_H /DPROTOBUF_USE_DLLS=0" ` + -DCMAKE_CXX_FLAGS="/Dgoogle_protobuf_undef_DWORD=1 /D__PRFCHWINTRIN_H /DPROTOBUF_USE_DLLS=0 /DPROTOBUF_STATIC_DEFINE" ` + -DCMAKE_C_FLAGS="/Dgoogle_protobuf_undef_DWORD=1 /D__PRFCHWINTRIN_H /DPROTOBUF_USE_DLLS=0 /DPROTOBUF_STATIC_DEFINE" ` -DProtobuf_USE_STATIC_LIBS=ON ` -DProtobuf_MSVC_STATIC_RUNTIME=ON ` + -DProtobuf_IMPORT_PREFIX="" ` + -DProtobuf_IMPORT_SUFFIX="" ` -DYAZE_BUILD_TESTS=ON ` -DYAZE_BUILD_EMU=ON ` -DYAZE_BUILD_Z3ED=ON `