Skip to content

Commit

Permalink
Binskim error EnableCriticalCompilerWarnings (#4764)
Browse files Browse the repository at this point in the history
Fixes a binskim error where sfsclient dependencies (curl -> ares) were
not getting compiled with a warning level > 3 compiler flag. Added `/W3`
to only the release triplets

Verified that of WindowsPackageManager.dll no longer shows an error when
running with binskim.
  • Loading branch information
ryfu-msft authored Aug 29, 2024
1 parent 5010482 commit 269c3c6
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions src/VcpkgCustomTriplets/arm-release-static.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
set(VCPKG_TARGET_ARCHITECTURE arm)
set(VCPKG_CRT_LINKAGE static)
set(VCPKG_LIBRARY_LINKAGE static)
set(VCPKG_C_FLAGS "/Qspectre")
set(VCPKG_CXX_FLAGS "/Qspectre")
set(VCPKG_C_FLAGS "/Qspectre /W3")
set(VCPKG_CXX_FLAGS "/Qspectre /W3")
set(VCPKG_BUILD_TYPE release)
4 changes: 2 additions & 2 deletions src/VcpkgCustomTriplets/arm-release.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
set(VCPKG_TARGET_ARCHITECTURE arm)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE static)
set(VCPKG_C_FLAGS "/Qspectre")
set(VCPKG_CXX_FLAGS "/Qspectre")
set(VCPKG_C_FLAGS "/Qspectre /W3")
set(VCPKG_CXX_FLAGS "/Qspectre /W3")
set(VCPKG_BUILD_TYPE release)
4 changes: 2 additions & 2 deletions src/VcpkgCustomTriplets/arm64-release-static.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
set(VCPKG_TARGET_ARCHITECTURE arm64)
set(VCPKG_CRT_LINKAGE static)
set(VCPKG_LIBRARY_LINKAGE static)
set(VCPKG_C_FLAGS "/Qspectre")
set(VCPKG_CXX_FLAGS "/Qspectre")
set(VCPKG_C_FLAGS "/Qspectre /W3")
set(VCPKG_CXX_FLAGS "/Qspectre /W3")
set(VCPKG_BUILD_TYPE release)
4 changes: 2 additions & 2 deletions src/VcpkgCustomTriplets/arm64-release.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
set(VCPKG_TARGET_ARCHITECTURE arm64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE static)
set(VCPKG_C_FLAGS "/Qspectre")
set(VCPKG_CXX_FLAGS "/Qspectre")
set(VCPKG_C_FLAGS "/Qspectre /W3")
set(VCPKG_CXX_FLAGS "/Qspectre /W3")
set(VCPKG_BUILD_TYPE release)
4 changes: 2 additions & 2 deletions src/VcpkgCustomTriplets/x64-release-static.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE static)
set(VCPKG_LIBRARY_LINKAGE static)
set(VCPKG_C_FLAGS "/Qspectre")
set(VCPKG_CXX_FLAGS "/Qspectre")
set(VCPKG_C_FLAGS "/Qspectre /W3")
set(VCPKG_CXX_FLAGS "/Qspectre /W3")
set(VCPKG_BUILD_TYPE release)
4 changes: 2 additions & 2 deletions src/VcpkgCustomTriplets/x64-release.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE static)
set(VCPKG_C_FLAGS "/Qspectre")
set(VCPKG_CXX_FLAGS "/Qspectre")
set(VCPKG_C_FLAGS "/Qspectre /W3")
set(VCPKG_CXX_FLAGS "/Qspectre /W3")
set(VCPKG_BUILD_TYPE release)
4 changes: 2 additions & 2 deletions src/VcpkgCustomTriplets/x86-release-static.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
set(VCPKG_TARGET_ARCHITECTURE x86)
set(VCPKG_CRT_LINKAGE static)
set(VCPKG_LIBRARY_LINKAGE static)
set(VCPKG_C_FLAGS "/Qspectre")
set(VCPKG_CXX_FLAGS "/Qspectre")
set(VCPKG_C_FLAGS "/Qspectre /W3")
set(VCPKG_CXX_FLAGS "/Qspectre /W3")
set(VCPKG_BUILD_TYPE release)
4 changes: 2 additions & 2 deletions src/VcpkgCustomTriplets/x86-release.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
set(VCPKG_TARGET_ARCHITECTURE x86)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE static)
set(VCPKG_C_FLAGS "/Qspectre")
set(VCPKG_CXX_FLAGS "/Qspectre")
set(VCPKG_C_FLAGS "/Qspectre /W3")
set(VCPKG_CXX_FLAGS "/Qspectre /W3")
set(VCPKG_BUILD_TYPE release)

0 comments on commit 269c3c6

Please sign in to comment.