Skip to content

Git Patch BoringSSL to disable Windows build warnings/errors #454

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Jun 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/cpp-packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -246,18 +246,18 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [windows-2016, ubuntu-latest, macos-latest]
os: [windows-latest, ubuntu-latest, macos-latest]
build_type: ["Release", "Debug"]
architecture: ["x64", "x86"]
msvc_runtime: ["static", "dynamic"]
linux_abi: ["legacy", "c++11"]
python_version: [3.7]
include:
- os: windows-2016
- os: windows-latest
vcpkg_triplet_suffix: "windows-static"
additional_build_flags: "--build_tests"
sdk_platform: "windows"
- os: windows-2016
- os: windows-latest
msvc_runtime: "dynamic"
vcpkg_triplet_suffix: "windows-static-md"
additional_build_flags: "--build_tests"
Expand All @@ -272,7 +272,7 @@ jobs:
sdk_platform: "darwin"

exclude:
- os: windows-2016
- os: windows-latest
linux_abi: "c++11"
- os: macos-latest
architecture: "x86"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:
required: true
operating_systems:
description: 'CSV of VMs to run on'
default: 'ubuntu-latest,windows-2016,macos-latest'
default: 'ubuntu-latest,windows-latest,macos-latest'
required: true
desktop_ssl_variants:
description: 'CSV of desktop SSL variants to use'
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
# Top level CMake file that defines the entire Firebase C++ SDK build.

cmake_minimum_required (VERSION 3.1)

set (CMAKE_CXX_STANDARD 11)

# Turn on virtual folders for visual studio
Expand Down
14 changes: 5 additions & 9 deletions cmake/external/boringssl.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,16 @@ if(TARGET boringssl OR NOT DOWNLOAD_BORINGSSL)
return()
endif()

# Based on https://github.com/grpc/grpc/blob/v1.27.0/bazel/grpc_deps.bzl
# master-with-bazel@{2019-10-18}
set(commit 83da28a68f32023fd3b95a8ae94991a07b1f6c62)
# set(commit master)
set(patch_file
${CMAKE_CURRENT_LIST_DIR}/../../scripts/git/patches/boringssl/0001-disable-C4255-converting-empty-params-to-void.patch)

ExternalProject_Add(
boringssl

DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR}
DOWNLOAD_NAME boringssl-${commit}.tar.gz
URL https://github.com/google/boringssl/archive/${commit}.tar.gz

GIT_REPOSITORY https://github.com/google/boringssl/
GIT_TAG 83da28a68f32023fd3b95a8ae94991a07b1f6c62
PATCH_COMMAND git apply ${patch_file}
PREFIX ${PROJECT_BINARY_DIR}

CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
Expand Down
12 changes: 6 additions & 6 deletions scripts/gha/print_matrix_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,27 +77,27 @@
"python_version": ["3.7"],

EXPANDED_KEY: {
"os": ["ubuntu-latest", "macos-latest", "windows-2016"],
"os": ["ubuntu-latest", "macos-latest", "windows-latest"],
"xcode_version": ["11.7", "12.4"],
}
}
},

"android": {
"matrix": {
"os": ["ubuntu-latest", "macos-latest", "windows-2016"],
"os": ["ubuntu-latest", "macos-latest", "windows-latest"],
"architecture": ["x64"],
"python_version": ["3.7"],

EXPANDED_KEY: {
"os": ["ubuntu-latest", "macos-latest", "windows-2016"]
"os": ["ubuntu-latest", "macos-latest", "windows-latest"]
}
}
},

"integration_tests": {
"matrix": {
"os": ["ubuntu-latest", "macos-latest", "windows-2016"],
"os": ["ubuntu-latest", "macos-latest", "windows-latest"],
"platform": ["Desktop", "Android", "iOS"],
"ssl_lib": ["openssl", "boringssl"],
"android_device": ["android_latest", "emulator_target"],
Expand Down Expand Up @@ -215,9 +215,9 @@ def print_value(value):
""" Print Json formatted string that can be consumed in Github workflow."""
# Eg: for lists,
# print(json.dumps) ->
# ["ubuntu-latest", "macos-latest", "windows-2016"]
# ["ubuntu-latest", "macos-latest", "windows-latest"]
# print(repr(json.dumps)) ->
# '["ubuntu-latest", "macos-latest", "windows-2016"]'
# '["ubuntu-latest", "macos-latest", "windows-latest"]'

# Eg: for strings
# print(json.dumps) -> "flame"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From 831806231dd360278dac2a37e3c3158420ad7bb3 Mon Sep 17 00:00:00 2001
From: "google.com" <google.com>
Date: Mon, 7 Jun 2021 13:57:27 -0400
Subject: [PATCH] disable C4255 converting () to (void)

---
src/CMakeLists.txt | 2 ++
1 file changed, 2 insertions(+)

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index b7f468fe6..48f61bfd8 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -193,6 +193,8 @@ elseif(MSVC)
# possible loss of data
"C4244" # 'function' : conversion from 'int' to 'uint8_t',
# possible loss of data
+ "C4255" # 'function' : no function prototype given: converting '()' to
+ # '(void)'
"C4267" # conversion from 'size_t' to 'int', possible loss of data
"C4371" # layout of class may have changed from a previous version of the
# compiler due to better packing of member '...'
--
2.32.0.rc1.229.g3e70b5a671-goog