From 94d669e0223fc324feba212ec4e6a1709b769fc4 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Sun, 22 Oct 2017 14:56:10 -0700 Subject: [PATCH 1/3] Supress strict prototype warning in gRPC pods --- gRPC-Core.podspec | 1 + gRPC-ProtoRPC.podspec | 1 + gRPC-RxLibrary.podspec | 4 ++++ gRPC.podspec | 1 + templates/gRPC-Core.podspec.template | 1 + templates/gRPC-ProtoRPC.podspec.template | 1 + templates/gRPC-RxLibrary.podspec.template | 4 ++++ templates/gRPC.podspec.template | 1 + 8 files changed, 14 insertions(+) diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 48f8f43e8d5..4d86a625b63 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -85,6 +85,7 @@ Pod::Spec.new do |s| 'USE_HEADERMAP' => 'NO', 'ALWAYS_SEARCH_USER_PATHS' => 'NO', 'GCC_PREPROCESSOR_DEFINITIONS' => '"$(inherited)" "COCOAPODS=1" "PB_NO_PACKED_STRUCTS=1"', + 'CLANG_WARN_STRICT_PROTOTYPES' => 'NO', } s.default_subspecs = 'Interface', 'Implementation' diff --git a/gRPC-ProtoRPC.podspec b/gRPC-ProtoRPC.podspec index 4b7b36a6874..ca265035b1e 100644 --- a/gRPC-ProtoRPC.podspec +++ b/gRPC-ProtoRPC.podspec @@ -52,5 +52,6 @@ Pod::Spec.new do |s| 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1', # This is needed by all pods that depend on gRPC-RxLibrary: 'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES' => 'YES', + 'CLANG_WARN_STRICT_PROTOTYPES' => 'NO', } end diff --git a/gRPC-RxLibrary.podspec b/gRPC-RxLibrary.podspec index 673239cb90a..f9420686e77 100644 --- a/gRPC-RxLibrary.podspec +++ b/gRPC-RxLibrary.podspec @@ -44,4 +44,8 @@ Pod::Spec.new do |s| s.source_files = "#{src_dir}/*.{h,m}", "#{src_dir}/**/*.{h,m}" s.private_header_files = "#{src_dir}/private/*.h" s.header_mappings_dir = "#{src_dir}" + + s.pod_target_xcconfig = { + 'CLANG_WARN_STRICT_PROTOTYPES' => 'NO', + } end diff --git a/gRPC.podspec b/gRPC.podspec index 6c200905416..bb526e84424 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -50,6 +50,7 @@ Pod::Spec.new do |s| s.pod_target_xcconfig = { # This is needed by all pods that depend on gRPC-RxLibrary: 'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES' => 'YES', + 'CLANG_WARN_STRICT_PROTOTYPES' => 'NO', } s.subspec 'Main' do |ss| diff --git a/templates/gRPC-Core.podspec.template b/templates/gRPC-Core.podspec.template index e34bc8331e9..2a583e0388a 100644 --- a/templates/gRPC-Core.podspec.template +++ b/templates/gRPC-Core.podspec.template @@ -112,6 +112,7 @@ 'USE_HEADERMAP' => 'NO', 'ALWAYS_SEARCH_USER_PATHS' => 'NO', 'GCC_PREPROCESSOR_DEFINITIONS' => '"$(inherited)" "COCOAPODS=1" "PB_NO_PACKED_STRUCTS=1"', + 'CLANG_WARN_STRICT_PROTOTYPES' => 'NO', } s.default_subspecs = 'Interface', 'Implementation' diff --git a/templates/gRPC-ProtoRPC.podspec.template b/templates/gRPC-ProtoRPC.podspec.template index 4d99f6e19fc..d2dcc429ef1 100644 --- a/templates/gRPC-ProtoRPC.podspec.template +++ b/templates/gRPC-ProtoRPC.podspec.template @@ -54,5 +54,6 @@ 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1', # This is needed by all pods that depend on gRPC-RxLibrary: 'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES' => 'YES', + 'CLANG_WARN_STRICT_PROTOTYPES' => 'NO', } end diff --git a/templates/gRPC-RxLibrary.podspec.template b/templates/gRPC-RxLibrary.podspec.template index de4ee1e4385..14147d7dc1b 100644 --- a/templates/gRPC-RxLibrary.podspec.template +++ b/templates/gRPC-RxLibrary.podspec.template @@ -46,4 +46,8 @@ s.source_files = "#{src_dir}/*.{h,m}", "#{src_dir}/**/*.{h,m}" s.private_header_files = "#{src_dir}/private/*.h" s.header_mappings_dir = "#{src_dir}" + + s.pod_target_xcconfig = { + 'CLANG_WARN_STRICT_PROTOTYPES' => 'NO', + } end diff --git a/templates/gRPC.podspec.template b/templates/gRPC.podspec.template index 4b360cfb4c4..6616e74bd71 100644 --- a/templates/gRPC.podspec.template +++ b/templates/gRPC.podspec.template @@ -52,6 +52,7 @@ s.pod_target_xcconfig = { # This is needed by all pods that depend on gRPC-RxLibrary: 'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES' => 'YES', + 'CLANG_WARN_STRICT_PROTOTYPES' => 'NO', } s.subspec 'Main' do |ss| From e18928a02978228110c3937e112c001a721eabba Mon Sep 17 00:00:00 2001 From: Matt Kwong Date: Mon, 9 Oct 2017 11:26:53 -0700 Subject: [PATCH 2/3] Use Ruby 2.3 for Brew --- .../internal_ci/helper_scripts/prepare_build_macos_rc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tools/internal_ci/helper_scripts/prepare_build_macos_rc b/tools/internal_ci/helper_scripts/prepare_build_macos_rc index 5a5898f94c4..a50e189e368 100644 --- a/tools/internal_ci/helper_scripts/prepare_build_macos_rc +++ b/tools/internal_ci/helper_scripts/prepare_build_macos_rc @@ -32,11 +32,12 @@ pip install google-api-python-client --user python export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/GrpcTesting-d0eeee2db331.json # If this is a PR using RUN_TESTS_FLAGS var, then add flags to filter tests -if [ -n "$KOKORO_GITHUB_PULL_REQUEST_NUMBER" ] && [ -n "$RUN_TESTS_FLAGS" ]; then - brew install jq - ghprbTargetBranch=$(curl -s https://api.github.com/repos/grpc/grpc/pulls/$KOKORO_GITHUB_PULL_REQUEST_NUMBER | jq -r .base.ref) - export RUN_TESTS_FLAGS="$RUN_TESTS_FLAGS --filter_pr_tests --base_branch origin/$ghprbTargetBranch" -fi +# TODO(matt-kwong): enable after fixing brew issue +# if [ -n "$KOKORO_GITHUB_PULL_REQUEST_NUMBER" ] && [ -n "$RUN_TESTS_FLAGS" ]; then +# brew install jq +# ghprbTargetBranch=$(curl -s https://api.github.com/repos/grpc/grpc/pulls/$KOKORO_GITHUB_PULL_REQUEST_NUMBER | jq -r .base.ref) +# export RUN_TESTS_FLAGS="$RUN_TESTS_FLAGS --filter_pr_tests --base_branch origin/$ghprbTargetBranch" +# fi set +ex # rvm script is very verbose and exits with errorcode source $HOME/.rvm/scripts/rvm From c91983d456966dab5b4232f14a4a3f1084f4b3f1 Mon Sep 17 00:00:00 2001 From: Matt Kwong Date: Thu, 19 Oct 2017 15:12:31 -0700 Subject: [PATCH 3/3] Fix brew install issue; enable MacOS test filtering --- .../helper_scripts/prepare_build_macos_rc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/internal_ci/helper_scripts/prepare_build_macos_rc b/tools/internal_ci/helper_scripts/prepare_build_macos_rc index a50e189e368..5196c7b536d 100644 --- a/tools/internal_ci/helper_scripts/prepare_build_macos_rc +++ b/tools/internal_ci/helper_scripts/prepare_build_macos_rc @@ -32,12 +32,12 @@ pip install google-api-python-client --user python export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/GrpcTesting-d0eeee2db331.json # If this is a PR using RUN_TESTS_FLAGS var, then add flags to filter tests -# TODO(matt-kwong): enable after fixing brew issue -# if [ -n "$KOKORO_GITHUB_PULL_REQUEST_NUMBER" ] && [ -n "$RUN_TESTS_FLAGS" ]; then -# brew install jq -# ghprbTargetBranch=$(curl -s https://api.github.com/repos/grpc/grpc/pulls/$KOKORO_GITHUB_PULL_REQUEST_NUMBER | jq -r .base.ref) -# export RUN_TESTS_FLAGS="$RUN_TESTS_FLAGS --filter_pr_tests --base_branch origin/$ghprbTargetBranch" -# fi +if [ -n "$KOKORO_GITHUB_PULL_REQUEST_NUMBER" ] && [ -n "$RUN_TESTS_FLAGS" ]; then + brew update + brew install jq + ghprbTargetBranch=$(curl -s https://api.github.com/repos/grpc/grpc/pulls/$KOKORO_GITHUB_PULL_REQUEST_NUMBER | jq -r .base.ref) + export RUN_TESTS_FLAGS="$RUN_TESTS_FLAGS --filter_pr_tests --base_branch origin/$ghprbTargetBranch" +fi set +ex # rvm script is very verbose and exits with errorcode source $HOME/.rvm/scripts/rvm