Skip to content

Commit

Permalink
[boringssl] Remove -WX and -Werror (#24899)
Browse files Browse the repository at this point in the history
* boringssl: Add a patch to disable another warning breaking build for VS2022.

Filed upstream as https://bugs.chromium.org/p/boringssl/issues/detail?id=495

* Update versions

* format portfile.cmake

* x-add-version

* Update patch, remove -WX and -Werror

* x-add-version

* update patch's name

* x-add-version

Co-authored-by: Lily Wang <v-lilywang@microsoft.com>
  • Loading branch information
rpavlik and Lily Wang authored Jun 2, 2022
1 parent 819a768 commit 850ba1a
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 23 deletions.
15 changes: 0 additions & 15 deletions ports/boringssl/0002-disable-waring-4065.patch

This file was deleted.

24 changes: 24 additions & 0 deletions ports/boringssl/0002-remove-WX-Werror.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 83ff477..3008c2a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -117,7 +117,7 @@ endif()
if(CMAKE_COMPILER_IS_GNUCXX OR CLANG)
# Note clang-cl is odd and sets both CLANG and MSVC. We base our configuration
# primarily on our normal Clang one.
- set(C_CXX_FLAGS "-Werror -Wformat=2 -Wsign-compare -Wmissing-field-initializers -Wwrite-strings -Wvla")
+ set(C_CXX_FLAGS "-Wformat=2 -Wsign-compare -Wmissing-field-initializers -Wwrite-strings -Wvla")
if(MSVC)
# clang-cl sets different default warnings than clang. It also treats -Wall
# as -Weverything, to match MSVC. Instead -W3 is the alias for -Wall.
@@ -238,8 +238,8 @@ elseif(MSVC)
${MSVC_DISABLED_WARNINGS_LIST})
string(REPLACE "C" " -w4" MSVC_LEVEL4_WARNINGS_STR
${MSVC_LEVEL4_WARNINGS_LIST})
- set(CMAKE_C_FLAGS "-utf-8 -Wall -WX ${MSVC_DISABLED_WARNINGS_STR} ${MSVC_LEVEL4_WARNINGS_STR}")
- set(CMAKE_CXX_FLAGS "-utf-8 -Wall -WX ${MSVC_DISABLED_WARNINGS_STR} ${MSVC_LEVEL4_WARNINGS_STR}")
+ set(CMAKE_C_FLAGS "-utf-8 -Wall ${MSVC_DISABLED_WARNINGS_STR} ${MSVC_LEVEL4_WARNINGS_STR}")
+ set(CMAKE_CXX_FLAGS "-utf-8 -Wall ${MSVC_DISABLED_WARNINGS_STR} ${MSVC_LEVEL4_WARNINGS_STR}")
endif()

if(WIN32)
11 changes: 5 additions & 6 deletions ports/boringssl/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,22 @@ vcpkg_from_github(
HEAD_REF master
PATCHES
0001-vcpkg.patch
0002-disable-waring-4065.patch
0002-remove-WX-Werror.patch
)

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
${FEATURE_OPTIONS}
OPTIONS_DEBUG
-DINSTALL_HEADERS=OFF
-DINSTALL_TOOLS=OFF
)

vcpkg_install_cmake()
vcpkg_cmake_install()

if(IS_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/boringssl)
vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/boringssl")
endif()

file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
8 changes: 7 additions & 1 deletion ports/boringssl/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
{
"name": "boringssl",
"version-date": "2021-06-23",
"port-version": 1,
"port-version": 2,
"description": "BoringSSl is a fork of OpenSSL developed by Google",
"homepage": "https://boringssl.googlesource.com/boringssl",
"supports": "!uwp",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
}
],
"features": {
"tools": {
"description": "Build bssl executable"
Expand Down
5 changes: 5 additions & 0 deletions versions/b-/boringssl.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "8d28c72d322cf2245e69075deef73c5edefee0b5",
"version-date": "2021-06-23",
"port-version": 2
},
{
"git-tree": "ca35c06a32c83f385f840831a435c69231a7852a",
"version-date": "2021-06-23",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -1130,7 +1130,7 @@
},
"boringssl": {
"baseline": "2021-06-23",
"port-version": 1
"port-version": 2
},
"botan": {
"baseline": "2.19.1",
Expand Down

0 comments on commit 850ba1a

Please sign in to comment.