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.
This commit is contained in:
1
.github/workflows/ci.yml
vendored
1
.github/workflows/ci.yml
vendored
@@ -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 `
|
||||
|
||||
1
.github/workflows/release.yml
vendored
1
.github/workflows/release.yml
vendored
@@ -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 `
|
||||
|
||||
Reference in New Issue
Block a user