Make platform-specific headers textual

pull/12888/head
Muxi Yan 7 years ago
parent 656041b3cc
commit cd9729780a
  1. 11
      gRPC-Core.podspec
  2. 32
      include/grpc/module.modulemap
  3. 6
      src/objective-c/BoringSSL.podspec
  4. 10
      templates/gRPC-Core.podspec.template
  5. 41
      templates/include/grpc/module.modulemap.template

@ -106,6 +106,8 @@ Pod::Spec.new do |s|
ss.source_files = 'include/grpc/support/alloc.h', ss.source_files = 'include/grpc/support/alloc.h',
'include/grpc/support/atm.h', 'include/grpc/support/atm.h',
'include/grpc/support/atm_gcc_atomic.h', 'include/grpc/support/atm_gcc_atomic.h',
'include/grpc/support/atm_gcc_sync.h',
'include/grpc/support/atm_windows.h',
'include/grpc/support/avl.h', 'include/grpc/support/avl.h',
'include/grpc/support/cmdline.h', 'include/grpc/support/cmdline.h',
'include/grpc/support/cpu.h', 'include/grpc/support/cpu.h',
@ -120,13 +122,18 @@ Pod::Spec.new do |s|
'include/grpc/support/sync_custom.h', 'include/grpc/support/sync_custom.h',
'include/grpc/support/sync_generic.h', 'include/grpc/support/sync_generic.h',
'include/grpc/support/sync_posix.h', 'include/grpc/support/sync_posix.h',
'include/grpc/support/sync_windows.h',
'include/grpc/support/thd.h', 'include/grpc/support/thd.h',
'include/grpc/support/time.h', 'include/grpc/support/time.h',
'include/grpc/support/tls.h', 'include/grpc/support/tls.h',
'include/grpc/support/tls_gcc.h',
'include/grpc/support/tls_msvc.h',
'include/grpc/support/tls_pthread.h', 'include/grpc/support/tls_pthread.h',
'include/grpc/support/useful.h', 'include/grpc/support/useful.h',
'include/grpc/impl/codegen/atm.h', 'include/grpc/impl/codegen/atm.h',
'include/grpc/impl/codegen/atm_gcc_atomic.h', 'include/grpc/impl/codegen/atm_gcc_atomic.h',
'include/grpc/impl/codegen/atm_gcc_sync.h',
'include/grpc/impl/codegen/atm_windows.h',
'include/grpc/impl/codegen/gpr_slice.h', 'include/grpc/impl/codegen/gpr_slice.h',
'include/grpc/impl/codegen/gpr_types.h', 'include/grpc/impl/codegen/gpr_types.h',
'include/grpc/impl/codegen/port_platform.h', 'include/grpc/impl/codegen/port_platform.h',
@ -134,6 +141,7 @@ Pod::Spec.new do |s|
'include/grpc/impl/codegen/sync_custom.h', 'include/grpc/impl/codegen/sync_custom.h',
'include/grpc/impl/codegen/sync_generic.h', 'include/grpc/impl/codegen/sync_generic.h',
'include/grpc/impl/codegen/sync_posix.h', 'include/grpc/impl/codegen/sync_posix.h',
'include/grpc/impl/codegen/sync_windows.h',
'include/grpc/impl/codegen/byte_buffer.h', 'include/grpc/impl/codegen/byte_buffer.h',
'include/grpc/impl/codegen/byte_buffer_reader.h', 'include/grpc/impl/codegen/byte_buffer_reader.h',
'include/grpc/impl/codegen/compression_types.h', 'include/grpc/impl/codegen/compression_types.h',
@ -145,6 +153,8 @@ Pod::Spec.new do |s|
'include/grpc/impl/codegen/status.h', 'include/grpc/impl/codegen/status.h',
'include/grpc/impl/codegen/atm.h', 'include/grpc/impl/codegen/atm.h',
'include/grpc/impl/codegen/atm_gcc_atomic.h', 'include/grpc/impl/codegen/atm_gcc_atomic.h',
'include/grpc/impl/codegen/atm_gcc_sync.h',
'include/grpc/impl/codegen/atm_windows.h',
'include/grpc/impl/codegen/gpr_slice.h', 'include/grpc/impl/codegen/gpr_slice.h',
'include/grpc/impl/codegen/gpr_types.h', 'include/grpc/impl/codegen/gpr_types.h',
'include/grpc/impl/codegen/port_platform.h', 'include/grpc/impl/codegen/port_platform.h',
@ -152,6 +162,7 @@ Pod::Spec.new do |s|
'include/grpc/impl/codegen/sync_custom.h', 'include/grpc/impl/codegen/sync_custom.h',
'include/grpc/impl/codegen/sync_generic.h', 'include/grpc/impl/codegen/sync_generic.h',
'include/grpc/impl/codegen/sync_posix.h', 'include/grpc/impl/codegen/sync_posix.h',
'include/grpc/impl/codegen/sync_windows.h',
'include/grpc/grpc_security.h', 'include/grpc/grpc_security.h',
'include/grpc/byte_buffer.h', 'include/grpc/byte_buffer.h',
'include/grpc/byte_buffer_reader.h', 'include/grpc/byte_buffer_reader.h',

@ -4,7 +4,6 @@ framework module grpc {
header "support/alloc.h" header "support/alloc.h"
header "support/atm.h" header "support/atm.h"
header "support/atm_gcc_atomic.h"
header "support/avl.h" header "support/avl.h"
header "support/cmdline.h" header "support/cmdline.h"
header "support/cpu.h" header "support/cpu.h"
@ -16,23 +15,17 @@ framework module grpc {
header "support/string_util.h" header "support/string_util.h"
header "support/subprocess.h" header "support/subprocess.h"
header "support/sync.h" header "support/sync.h"
header "support/sync_custom.h"
header "support/sync_generic.h" header "support/sync_generic.h"
header "support/sync_posix.h"
header "support/thd.h" header "support/thd.h"
header "support/time.h" header "support/time.h"
header "support/tls.h" header "support/tls.h"
header "support/tls_pthread.h"
header "support/useful.h" header "support/useful.h"
header "impl/codegen/atm.h" header "impl/codegen/atm.h"
header "impl/codegen/atm_gcc_atomic.h"
header "impl/codegen/gpr_slice.h" header "impl/codegen/gpr_slice.h"
header "impl/codegen/gpr_types.h" header "impl/codegen/gpr_types.h"
header "impl/codegen/port_platform.h" header "impl/codegen/port_platform.h"
header "impl/codegen/sync.h" header "impl/codegen/sync.h"
header "impl/codegen/sync_custom.h"
header "impl/codegen/sync_generic.h" header "impl/codegen/sync_generic.h"
header "impl/codegen/sync_posix.h"
header "impl/codegen/byte_buffer.h" header "impl/codegen/byte_buffer.h"
header "impl/codegen/byte_buffer_reader.h" header "impl/codegen/byte_buffer_reader.h"
header "impl/codegen/compression_types.h" header "impl/codegen/compression_types.h"
@ -43,14 +36,11 @@ framework module grpc {
header "impl/codegen/slice.h" header "impl/codegen/slice.h"
header "impl/codegen/status.h" header "impl/codegen/status.h"
header "impl/codegen/atm.h" header "impl/codegen/atm.h"
header "impl/codegen/atm_gcc_atomic.h"
header "impl/codegen/gpr_slice.h" header "impl/codegen/gpr_slice.h"
header "impl/codegen/gpr_types.h" header "impl/codegen/gpr_types.h"
header "impl/codegen/port_platform.h" header "impl/codegen/port_platform.h"
header "impl/codegen/sync.h" header "impl/codegen/sync.h"
header "impl/codegen/sync_custom.h"
header "impl/codegen/sync_generic.h" header "impl/codegen/sync_generic.h"
header "impl/codegen/sync_posix.h"
header "grpc_security.h" header "grpc_security.h"
header "byte_buffer.h" header "byte_buffer.h"
header "byte_buffer_reader.h" header "byte_buffer_reader.h"
@ -65,6 +55,28 @@ framework module grpc {
header "support/workaround_list.h" header "support/workaround_list.h"
header "census.h" header "census.h"
textual header "support/atm_gcc_atomic.h"
textual header "support/atm_gcc_sync.h"
textual header "support/atm_windows.h"
textual header "support/sync_custom.h"
textual header "support/sync_posix.h"
textual header "support/sync_windows.h"
textual header "support/tls_gcc.h"
textual header "support/tls_msvc.h"
textual header "support/tls_pthread.h"
textual header "impl/codegen/atm_gcc_atomic.h"
textual header "impl/codegen/atm_gcc_sync.h"
textual header "impl/codegen/atm_windows.h"
textual header "impl/codegen/sync_custom.h"
textual header "impl/codegen/sync_posix.h"
textual header "impl/codegen/sync_windows.h"
textual header "impl/codegen/atm_gcc_atomic.h"
textual header "impl/codegen/atm_gcc_sync.h"
textual header "impl/codegen/atm_windows.h"
textual header "impl/codegen/sync_custom.h"
textual header "impl/codegen/sync_posix.h"
textual header "impl/codegen/sync_windows.h"
export * export *
module * { export * } module * { export * }
} }

@ -31,7 +31,7 @@
Pod::Spec.new do |s| Pod::Spec.new do |s|
s.name = 'BoringSSL' s.name = 'BoringSSL'
version = '9.0' version = '9.1'
s.version = version s.version = version
s.summary = 'BoringSSL is a fork of OpenSSL that is designed to meet Google’s needs.' s.summary = 'BoringSSL is a fork of OpenSSL that is designed to meet Google’s needs.'
# Adapted from the homepage: # Adapted from the homepage:
@ -67,9 +67,10 @@ Pod::Spec.new do |s|
# "The name and email addresses of the library maintainers, not the Podspec maintainer." # "The name and email addresses of the library maintainers, not the Podspec maintainer."
s.authors = 'Adam Langley', 'David Benjamin', 'Matt Braithwaite' s.authors = 'Adam Langley', 'David Benjamin', 'Matt Braithwaite'
major_version = version[0] + '.0'
s.source = { s.source = {
:git => 'https://boringssl.googlesource.com/boringssl', :git => 'https://boringssl.googlesource.com/boringssl',
:tag => "version_for_cocoapods_#{version}", :tag => "version_for_cocoapods_#{major_version}",
} }
name = 'openssl' name = 'openssl'
@ -186,6 +187,7 @@ Pod::Spec.new do |s|
cat > include/openssl/BoringSSL.modulemap <<EOF cat > include/openssl/BoringSSL.modulemap <<EOF
framework module openssl { framework module openssl {
umbrella header "umbrella.h" umbrella header "umbrella.h"
textual header "arm_arch.h"
export * export *
module * { export * } module * { export * }
} }

@ -31,19 +31,11 @@
return [f for f in out if not f.startswith("third_party/nanopb/")] return [f for f in out if not f.startswith("third_party/nanopb/")]
def grpc_public_headers(libs): def grpc_public_headers(libs):
excluded_files = ["include/grpc/support/atm_gcc_sync.h",
"include/grpc/support/atm_windows.h",
"include/grpc/support/sync_windows.h",
"include/grpc/support/tls_gcc.h",
"include/grpc/support/tls_msvc.h",
"include/grpc/impl/codegen/atm_gcc_sync.h",
"include/grpc/impl/codegen/atm_windows.h",
"include/grpc/impl/codegen/sync_windows.h"]
out = [] out = []
for lib in libs: for lib in libs:
if lib.name in ("grpc", "gpr"): if lib.name in ("grpc", "gpr"):
out += lib.get('public_headers', []) out += lib.get('public_headers', [])
return [f for f in out if not f in excluded_files] return out
def grpc_private_headers(libs): def grpc_private_headers(libs):
out = [] out = []

@ -1,31 +1,54 @@
%YAML 1.2 %YAML 1.2
--- | --- |
<%! <%!
# TODO (mxyan): Make this list from build.yaml
textual_headers = ["include/grpc/support/atm_gcc_atomic.h",
"include/grpc/support/atm_gcc_sync.h",
"include/grpc/support/atm_windows.h",
"include/grpc/support/sync_custom.h",
"include/grpc/support/sync_posix.h",
"include/grpc/support/sync_windows.h",
"include/grpc/support/tls_gcc.h",
"include/grpc/support/tls_msvc.h",
"include/grpc/support/tls_pthread.h",
"include/grpc/impl/codegen/atm_gcc_atomic.h",
"include/grpc/impl/codegen/atm_gcc_sync.h",
"include/grpc/impl/codegen/atm_windows.h",
"include/grpc/impl/codegen/sync_custom.h",
"include/grpc/impl/codegen/sync_posix.h",
"include/grpc/impl/codegen/sync_windows.h"]
def grpc_public_headers_no_dir(libs): def grpc_public_headers_no_dir(libs):
excluded_files = ["include/grpc/support/atm_gcc_sync.h",
"include/grpc/support/atm_windows.h",
"include/grpc/support/sync_windows.h",
"include/grpc/support/tls_gcc.h",
"include/grpc/support/tls_msvc.h",
"include/grpc/impl/codegen/atm_gcc_sync.h",
"include/grpc/impl/codegen/atm_windows.h",
"include/grpc/impl/codegen/sync_windows.h"]
out = [] out = []
for lib in libs: for lib in libs:
if lib.name in ("grpc", "gpr"): if lib.name in ("grpc", "gpr"):
out += lib.get('public_headers', []) out += lib.get('public_headers', [])
out = [f for f in out if f not in excluded_files] out = [f for f in out if f not in textual_headers]
out = [hdr.split('/', 2)[2] for hdr in out]
return out
def grpc_public_textual_headers_no_dir(libs):
out = []
for lib in libs:
if lib.name in ("grpc", "gpr"):
out += lib.get('public_headers', [])
out = [f for f in out if f in textual_headers]
out = [hdr.split('/', 2)[2] for hdr in out] out = [hdr.split('/', 2)[2] for hdr in out]
return out return out
def header_lines(files): def header_lines(files):
return ('\n ').join('header "%s"' % f for f in files) return ('\n ').join('header "%s"' % f for f in files)
def textual_header_lines(files):
return ('\n ').join('textual header "%s"' % f for f in files)
%> %>
framework module grpc { framework module grpc {
umbrella header "grpc.h" umbrella header "grpc.h"
${header_lines(grpc_public_headers_no_dir(libs))} ${header_lines(grpc_public_headers_no_dir(libs))}
${textual_header_lines(grpc_public_textual_headers_no_dir(libs))}
export * export *
module * { export * } module * { export * }
} }

Loading…
Cancel
Save