From 85e6fb5a8309271be1d228724311b0bc28cd67ed Mon Sep 17 00:00:00 2001 From: scawful Date: Mon, 13 Oct 2025 20:07:10 -0400 Subject: [PATCH] fix(ci): specify MSVC linker in CI and release workflows - Added `-DCMAKE_LINKER=link.exe` to both CI and release workflows to ensure compatibility with MSVC, addressing issues with lld-link on protobuf resource files. Benefits: - Enhances build reliability on Windows by using the appropriate linker for MSVC, improving the overall CI and release process. --- .github/workflows/ci.yml | 1 + .github/workflows/release.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index deb87925..62e752c1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -234,6 +234,7 @@ jobs: -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} ` -DCMAKE_C_COMPILER=${{ matrix.cc }} ` -DCMAKE_CXX_COMPILER=${{ matrix.cxx }} ` + -DCMAKE_LINKER=link.exe ` # Use MSVC linker; lld-link fails on protobuf resource files -DCMAKE_TOOLCHAIN_FILE="$vcpkgToolchain" ` -DVCPKG_TARGET_TRIPLET=x64-windows-static ` -DVCPKG_MANIFEST_MODE=ON ` diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4ac65f29..1ab58c64 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -241,6 +241,7 @@ jobs: -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} ` -DCMAKE_C_COMPILER=${{ matrix.cc }} ` -DCMAKE_CXX_COMPILER=${{ matrix.cxx }} ` + -DCMAKE_LINKER=link.exe ` # Use MSVC linker; lld-link fails on protobuf resource files -DCMAKE_TOOLCHAIN_FILE="$vcpkgToolchain" ` -DVCPKG_TARGET_TRIPLET=x64-windows-static ` -DVCPKG_MANIFEST_MODE=ON `