diff options
author | Muxi Yan <mxyan@google.com> | 2017-10-06 13:46:27 -0700 |
---|---|---|
committer | Muxi Yan <mxyan@google.com> | 2017-10-06 15:35:13 -0700 |
commit | 405762733aea4f22dd36a9677a751d2808154b0b (patch) | |
tree | 519a549257ada438d322e454ee2de1bf1f78ab99 /templates | |
parent | 6b69f2a164c631fe4d14e799a6e7a20e560ce0aa (diff) |
Make platform-specific headers textual
Diffstat (limited to 'templates')
-rw-r--r-- | templates/gRPC-Core.podspec.template | 10 | ||||
-rw-r--r-- | templates/include/grpc/module.modulemap.template | 41 |
2 files changed, 33 insertions, 18 deletions
diff --git a/templates/gRPC-Core.podspec.template b/templates/gRPC-Core.podspec.template index 5dc020d7d9..e34bc8331e 100644 --- a/templates/gRPC-Core.podspec.template +++ b/templates/gRPC-Core.podspec.template @@ -31,19 +31,11 @@ return [f for f in out if not f.startswith("third_party/nanopb/")] 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 = [] for lib in libs: if lib.name in ("grpc", "gpr"): out += lib.get('public_headers', []) - return [f for f in out if not f in excluded_files] + return out def grpc_private_headers(libs): out = [] diff --git a/templates/include/grpc/module.modulemap.template b/templates/include/grpc/module.modulemap.template index 8edc4b56ac..9dde240e43 100644 --- a/templates/include/grpc/module.modulemap.template +++ b/templates/include/grpc/module.modulemap.template @@ -1,31 +1,54 @@ %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): - 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 = [] for lib in libs: if lib.name in ("grpc", "gpr"): 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] return out def header_lines(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 { umbrella header "grpc.h" ${header_lines(grpc_public_headers_no_dir(libs))} + ${textual_header_lines(grpc_public_textual_headers_no_dir(libs))} + export * module * { export * } } |