Skip to content

Commit

Permalink
[objc] backport #37690 to v1.67.x (#37712)
Browse files Browse the repository at this point in the history
Backport #37690

cc @HannahShiSFB @sampajano

Co-authored-by: Hannah Shi <hannahshisfb@gmail.com>
  • Loading branch information
apolcyn and HannahShiSFB authored Sep 16, 2024
1 parent ace22e3 commit 1eb5673
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 17 deletions.
12 changes: 4 additions & 8 deletions src/objective-c/BoringSSL-GRPC.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ Pod::Spec.new do |s|
ss.source_files = 'src/ssl/*.{h,c,cc}',
'src/ssl/**/*.{h,c,cc}',
'src/crypto/*.{h,c,cc}',
'src/crypto/**/*.{h,c,cc}',
'src/crypto/**/*.{h,c,cc,inc}',
# We have to include fiat because spake25519 depends on it
'src/third_party/fiat/*.{h,c,cc}',
# Include the err_data.c pre-generated in boringssl's master-with-bazel branch
Expand All @@ -143,11 +143,7 @@ Pod::Spec.new do |s|
'src/crypto/*.h',
'src/crypto/**/*.h',
'src/third_party/fiat/*.h'
# bcm.c includes other source files, creating duplicated symbols. Since it is not used, we
# explicitly exclude it from the pod.
# TODO (mxyan): Work with BoringSSL team to remove this hack.
ss.exclude_files = 'src/crypto/fipsmodule/bcm.c',
'src/**/*_test.*',
ss.exclude_files = 'src/**/*_test.*',
'src/**/test_*.*',
'src/**/test/*.*'

Expand Down Expand Up @@ -713,10 +709,10 @@ Pod::Spec.new do |s|
EOF
# 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 <openssl/;#include <openssl_grpc/;g'
find . -type f \\( -path '*.h' -or -path '*.cc' -or -path '*.c' -or -path '*.inc' \\) -print0 | xargs -0 -L1 sed -E -i'.grpc_back' 's;#include <openssl/;#include <openssl_grpc/;g'
# Include of boringssl_prefix_symbols.h does not follow Xcode import style. We add the package
# name here so that Xcode knows where to find it.
find . -type f \\( -path '*.h' -or -path '*.cc' -or -path '*.c' \\) -print0 | xargs -0 -L1 sed -E -i'.grpc_back' 's;#include <boringssl_prefix_symbols.h>;#include <openssl_grpc/boringssl_prefix_symbols.h>;g'
find . -type f \\( -path '*.h' -or -path '*.cc' -or -path '*.c' -or -path '*.inc' \\) -print0 | xargs -0 -L1 sed -E -i'.grpc_back' 's;#include <boringssl_prefix_symbols.h>;#include <openssl_grpc/boringssl_prefix_symbols.h>;g'
END_OF_COMMAND
end
2 changes: 1 addition & 1 deletion src/objective-c/tests/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def grpc_deps
end

target 'TvTests' do
platform :tvos, '10.0'
platform :tvos, '12.0'
grpc_deps
end

Expand Down
12 changes: 4 additions & 8 deletions templates/src/objective-c/BoringSSL-GRPC.podspec.template
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@
ss.source_files = 'src/ssl/*.{h,c,cc}',
'src/ssl/**/*.{h,c,cc}',
'src/crypto/*.{h,c,cc}',
'src/crypto/**/*.{h,c,cc}',
'src/crypto/**/*.{h,c,cc,inc}',
# We have to include fiat because spake25519 depends on it
'src/third_party/fiat/*.{h,c,cc}',
# Include the err_data.c pre-generated in boringssl's master-with-bazel branch
Expand All @@ -174,11 +174,7 @@
'src/crypto/*.h',
'src/crypto/**/*.h',
'src/third_party/fiat/*.h'
# bcm.c includes other source files, creating duplicated symbols. Since it is not used, we
# explicitly exclude it from the pod.
# TODO (mxyan): Work with BoringSSL team to remove this hack.
ss.exclude_files = 'src/crypto/fipsmodule/bcm.c',
'src/**/*_test.*',
ss.exclude_files = 'src/**/*_test.*',
'src/**/test_*.*',
'src/**/test/*.*'

Expand Down Expand Up @@ -221,10 +217,10 @@
EOF

# 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 <openssl/;#include <openssl_grpc/;g'
find . -type f \\( -path '*.h' -or -path '*.cc' -or -path '*.c' -or -path '*.inc' \\) -print0 | xargs -0 -L1 sed -E -i'.grpc_back' 's;#include <openssl/;#include <openssl_grpc/;g'

# Include of boringssl_prefix_symbols.h does not follow Xcode import style. We add the package
# name here so that Xcode knows where to find it.
find . -type f \\( -path '*.h' -or -path '*.cc' -or -path '*.c' \\) -print0 | xargs -0 -L1 sed -E -i'.grpc_back' 's;#include <boringssl_prefix_symbols.h>;#include <openssl_grpc/boringssl_prefix_symbols.h>;g'
find . -type f \\( -path '*.h' -or -path '*.cc' -or -path '*.c' -or -path '*.inc' \\) -print0 | xargs -0 -L1 sed -E -i'.grpc_back' 's;#include <boringssl_prefix_symbols.h>;#include <openssl_grpc/boringssl_prefix_symbols.h>;g'
END_OF_COMMAND
end

0 comments on commit 1eb5673

Please sign in to comment.