use boringssl-with-bazel instead of third_party/boringssl

pull/21527/head
Jan Tattermusch 5 years ago
parent baa895f1b6
commit 742c61294b
  1. 2
      .clang_complete
  2. 2
      PYTHON-MANIFEST.in
  3. 2
      build.yaml
  4. 2
      setup.py
  5. 8
      templates/Makefile.template
  6. 2
      templates/config.m4.template
  7. 2
      templates/src/objective-c/BoringSSL-GRPC.podspec.template
  8. 1
      test/distrib/cpp/run_distrib_test_cmake_as_externalproject.sh
  9. 4
      tools/distrib/check_shadow_boringssl_symbol_list.sh
  10. 8
      tools/distrib/generate_grpc_shadow_boringssl_symbol_list.sh

@ -6,7 +6,7 @@
-Isrc/core/ext/upb-generated
-Ithird_party/abseil-cpp
-Ithird_party/benchmark/include
-Ithird_party/boringssl/include
-Ithird_party/boringssl-with-bazel/src/include
-Ithird_party/cares
-Ithird_party/cares/cares
-Ithird_party/googletest

@ -6,7 +6,7 @@ graft src/boringssl
graft include/grpc
graft third_party/abseil-cpp/absl
graft third_party/address_sorting
graft third_party/boringssl
graft third_party/boringssl-with-bazel
graft third_party/cares
graft third_party/upb
graft third_party/zlib

@ -6267,7 +6267,7 @@ defaults:
CPPFLAGS: -Ithird_party/benchmark/include -DHAVE_POSIX_REGEX
boringssl:
CFLAGS: -g
CPPFLAGS: -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM
CPPFLAGS: -Ithird_party/boringssl-with-bazel/src/include -fvisibility=hidden -DOPENSSL_NO_ASM
-D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX
CXXFLAGS: -fno-exceptions
global:

@ -51,7 +51,7 @@ if 'linux' in sys.platform:
CARES_INCLUDE += (os.path.join('third_party', 'cares', 'config_linux'),)
if 'openbsd' in sys.platform:
CARES_INCLUDE += (os.path.join('third_party', 'cares', 'config_openbsd'),)
SSL_INCLUDE = (os.path.join('third_party', 'boringssl', 'include'),)
SSL_INCLUDE = (os.path.join('third_party', 'boringssl-with-bazel', 'src', 'include'),)
UPB_INCLUDE = (os.path.join('third_party', 'upb'),)
UPB_GRPC_GENERATED_INCLUDE = (os.path.join('src', 'core', 'ext', 'upb-generated'),)
ZLIB_INCLUDE = (os.path.join('third_party', 'zlib'),)

@ -537,7 +537,7 @@
# Note that for testing purposes, one can do:
# make HAS_EMBEDDED_OPENSSL_ALPN=false
# to emulate the fact we do not have OpenSSL in the third_party folder.
ifeq ($(wildcard third_party/boringssl/include/openssl/ssl.h),)
ifeq ($(wildcard third_party/boringssl-with-bazel/src/include/openssl/ssl.h),)
HAS_EMBEDDED_OPENSSL_ALPN = false
else
CAN_COMPILE_EMBEDDED_OPENSSL ?= $(shell $(BORINGSSL_COMPILE_CHECK_CMD) 2> /dev/null && echo true || echo false)
@ -663,7 +663,7 @@
OPENSSL_MERGE_LIBS += $(LIBDIR)/$(CONFIG)/libboringssl.a
OPENSSL_MERGE_OBJS += $(LIBBORINGSSL_OBJS)
# need to prefix these to ensure overriding system libraries
CPPFLAGS := -Ithird_party/boringssl/include $(CPPFLAGS)
CPPFLAGS := -Ithird_party/boringssl-with-bazel/src/include $(CPPFLAGS)
else ifneq ($(EMBED_OPENSSL),false)
OPENSSL_DEP += $(EMBED_OPENSSL)/libssl.a $(EMBED_OPENSSL)/libcrypto.a
OPENSSL_MERGE_LIBS += $(EMBED_OPENSSL)/libssl.a $(EMBED_OPENSSL)/libcrypto.a
@ -1763,8 +1763,8 @@
# boringssl needs an override to ensure that it does not include
# system openssl headers regardless of other configuration
# we do so here with a target specific variable assignment
$(${tgt.name.upper()}_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value $(NO_W_EXTRA_SEMI)
$(${tgt.name.upper()}_OBJS): CXXFLAGS := -Ithird_party/boringssl/include $(CXXFLAGS)
$(${tgt.name.upper()}_OBJS): CFLAGS := -Ithird_party/boringssl-with-bazel/src/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value $(NO_W_EXTRA_SEMI)
$(${tgt.name.upper()}_OBJS): CXXFLAGS := -Ithird_party/boringssl-with-bazel/src/include $(CXXFLAGS)
$(${tgt.name.upper()}_OBJS): CPPFLAGS += -DOPENSSL_NO_ASM -D_GNU_SOURCE
% else:
% endif

@ -12,7 +12,7 @@
PHP_ADD_INCLUDE(PHP_EXT_SRCDIR()/src/php/ext/grpc)
PHP_ADD_INCLUDE(PHP_EXT_SRCDIR()/third_party/abseil-cpp)
PHP_ADD_INCLUDE(PHP_EXT_SRCDIR()/third_party/address_sorting/include)
PHP_ADD_INCLUDE(PHP_EXT_SRCDIR()/third_party/boringssl/include)
PHP_ADD_INCLUDE(PHP_EXT_SRCDIR()/third_party/boringssl-with-bazel/src/include)
PHP_ADD_INCLUDE(PHP_EXT_SRCDIR()/third_party/upb)
LIBS="-lpthread $LIBS"

@ -4,7 +4,7 @@
def expand_symbol_list(symbol_list):
return ',\n '.join("'#define %s GRPC_SHADOW_%s'" % (symbol, symbol) for symbol in symbol_list)
import subprocess
boringssl_commit = subprocess.check_output(['git', 'rev-parse', 'HEAD'], cwd='third_party/boringssl').decode().strip()
boringssl_commit = subprocess.check_output(['git', 'rev-parse', 'HEAD'], cwd='third_party/boringssl-with-bazel').decode().strip()
%>
# This file has been automatically generated from a template file.

@ -28,7 +28,6 @@ apt-get install -t jessie-backports -y libssl-dev
# before starting the test.
rm -r third_party/benchmark/* || true
rm -r third_party/bloaty/* || true
rm -r third_party/boringssl/* || true
rm -r third_party/boringssl-with-bazel/* || true
rm -r third_party/gflags/* || true
rm -r third_party/googletest/* || true

@ -24,9 +24,9 @@ boringssl_podspec_original="../../src/objective-c/BoringSSL-GRPC.podspec"
symbol_list="../../src/objective-c/grpc_shadow_boringssl_symbol_list"
# Check BoringSSL version matches
ver1=$(git submodule |grep "boringssl " | awk '{print $1}' | head -n 1)
ver1=$(git submodule | grep "boringssl-with-bazel " | awk '{print $1}' | head -n 1)
ver2=$(cat $boringssl_podspec_original | grep ':commit =>' | sed -E 's/.*"(.*)".*/\1/g')
ver3=$(cat $symbol_list | sed -n '2 p')
[ $ver1 == $ver2 ] && [ $ver1 == $ver3 ] || { echo "BoringSSL submodule (third_party/boringssl), BoringSSL podspec (src/objective-c/BoringSSL.podspec), and BoringSSL symbol list (src/objective-c/grpc_shadow_boringssl_symbol_list) commit do not match." ; echo "BoringSSL submodule: $ver1" ; echo "BoringSSL podspec: $ver2" ; echo "BoringSSL symbol list: $ver3" ; exit 1 ; }
[ $ver1 == $ver2 ] && [ $ver1 == $ver3 ] || { echo "BoringSSL submodule (third_party/boringssl-with-bazel), BoringSSL podspec (src/objective-c/BoringSSL.podspec), and BoringSSL symbol list (src/objective-c/grpc_shadow_boringssl_symbol_list) commit do not match." ; echo "BoringSSL submodule: $ver1" ; echo "BoringSSL podspec: $ver2" ; echo "BoringSSL symbol list: $ver3" ; exit 1 ; }
exit 0

@ -21,11 +21,11 @@ cd $(dirname $0)
symbol_list="../../src/objective-c/grpc_shadow_boringssl_symbol_list"
ssl_lib='../../third_party/boringssl/build/ssl/libssl.a'
crypto_lib='../../third_party/boringssl/build/crypto/libcrypto.a'
ssl_lib='../../third_party/boringssl-with-bazel/build/libssl.a'
crypto_lib='../../third_party/boringssl-with-bazel/build/libcrypto.a'
# Generate boringssl archives
( cd ../../third_party/boringssl ; mkdir -p build ; cd build ; cmake .. ; make -j ssl crypto )
( cd ../../third_party/boringssl-with-bazel ; mkdir -p build ; cd build ; cmake .. ; make -j ssl crypto )
# Generate shadow_boringssl.h
unameOut="$(uname -s)"
@ -54,7 +54,7 @@ case "${unameOut}" in
;;
esac
commit=$(git submodule | grep "boringssl " | awk '{print $1}' | head -n 1)
commit=$(git submodule | grep "boringssl-with-bazel " | awk '{print $1}' | head -n 1)
echo "# Automatically generated by tools/distrib/generate_grpc_shadow_boringssl_symbol_list.sh" > $symbol_list
echo $commit >> $symbol_list

Loading…
Cancel
Save