diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 04e30e692cd..56424513c2b 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -186,7 +186,7 @@ Pod::Spec.new do |s| ss.libraries = 'z' ss.dependency "#{s.name}/Interface", version ss.dependency 'BoringSSL-GRPC', '0.0.5' - ss.compiler_flags = '-DGRPC_SHADOW_BORINGSSL_SYMBOLS' + ss.compiler_flags = '-DBORINGSSL_PREFIX=GRPC' ss.source_files = 'src/core/ext/filters/census/grpc_context.cc', 'src/core/ext/filters/client_channel/backend_metric.cc', diff --git a/src/objective-c/BoringSSL-GRPC.podspec b/src/objective-c/BoringSSL-GRPC.podspec index 6b53dc892d8..e476c2836dc 100644 --- a/src/objective-c/BoringSSL-GRPC.podspec +++ b/src/objective-c/BoringSSL-GRPC.podspec @@ -112,7 +112,7 @@ Pod::Spec.new do |s| # We don't need to inhibit all warnings; only -Wno-shorten-64-to-32. But Cocoapods' linter doesn't # want that for some reason. - s.compiler_flags = '-DOPENSSL_NO_ASM', '-GCC_WARN_INHIBIT_ALL_WARNINGS', '-w' + s.compiler_flags = '-DOPENSSL_NO_ASM', '-GCC_WARN_INHIBIT_ALL_WARNINGS', '-w', '-DBORINGSSL_PREFIX=GRPC' s.requires_arc = false # Like many other C libraries, BoringSSL has its public headers under `include//` and its @@ -1622,3287 +1622,14 @@ Pod::Spec.new do |s| EOF - # The symbol prefixing mechanism is performed by redefining BoringSSL symbols with "#define - # SOME_BORINGSSL_SYMBOL GRPC_SHADOW_SOME_BORINGSSL_SYMBOL". Unfortunately, some symbols are - # already redefined as macros in BoringSSL headers in the form "#define SOME_BORINGSSL_SYMBOL - # SOME_BORINGSSL_SYMBOL" Such type of redefinition will cause "SOME_BORINGSSL_SYMBOL redefined" - # error when using together with our prefix header. So the workaround in the below lines removes - # all such type of #define directives. - sed -i'.back' '/^#define \\([A-Za-z0-9_]*\\) \\1/d' include/openssl/*.h - # Remove lines of the format below for the same reason above - # #define SOME_BORINGSSL_SYMBOL \ - # SOME_BORINGSSL_SYMBOL - sed -i'.back' '/^#define.*\\\\$/{N;/^#define \\([A-Za-z0-9_]*\\) *\\\\\\n *\\1/d;}' include/openssl/*.h + # Grab prefix header from GCS + curl -o include/openssl/boringssl_prefix_symbols.h https://storage.googleapis.com/grpc_boringssl_prefix_headers/boringssl_prefix_symbols-7f02881e96e51f1873afcf384d02f782b48967ca.h # We are renaming openssl to openssl_grpc so that there is no conflict with openssl if it exists find . -type f \\( -path '*.h' -or -path '*.cc' -or -path '*.c' \\) -print0 | xargs -0 -L1 sed -E -i'.grpc_back' 's;#include ;#include ;g' + END_OF_COMMAND end