From 99d25eec712e84affe0861f5801b87019f7b905b Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Mon, 30 Jun 2025 01:45:10 +0800 Subject: [PATCH] Use proper capitalization for MSVC linker flags The linker flags are case insensitive [1] but it would be better to use the proper capitalization [2]. [1] https://learn.microsoft.com/en-us/cpp/build/reference/linking?view=msvc-170#command-line [2] https://learn.microsoft.com/en-us/cpp/build/reference/guard-enable-guard-checks?view=msvc-170 PR #22940. --- .github/workflows/ci_windows.yaml | 2 +- cmake/Modules/CommonConfig.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_windows.yaml b/.github/workflows/ci_windows.yaml index 7a9b0910d..a5e06b1a2 100644 --- a/.github/workflows/ci_windows.yaml +++ b/.github/workflows/ci_windows.yaml @@ -121,7 +121,7 @@ jobs: ${{ env.libtorrent_path }} cd ${{ env.libtorrent_path }} $env:CXXFLAGS+=" /guard:cf" - $env:LDFLAGS+=" /guard:cf" + $env:LDFLAGS+=" /GUARD:CF" cmake ` -B build ` -G "Ninja" ` diff --git a/cmake/Modules/CommonConfig.cmake b/cmake/Modules/CommonConfig.cmake index 85535313a..32aebd62e 100644 --- a/cmake/Modules/CommonConfig.cmake +++ b/cmake/Modules/CommonConfig.cmake @@ -89,7 +89,7 @@ if (MSVC) /Zc:__cplusplus ) target_link_options(qbt_common_cfg INTERFACE - /guard:cf + /GUARD:CF $<$>:/OPT:REF /OPT:ICF> # suppress linking warning due to /INCREMENTAL and /OPT:ICF being both ON $<$:/INCREMENTAL:NO>