module.modulemap.template 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. %YAML 1.2
  2. --- |
  3. <%
  4. # TODO (mxyan): Make this list from build.yaml
  5. textual_headers = {"include/grpc/support/atm_gcc_atomic.h",
  6. "include/grpc/support/atm_gcc_sync.h",
  7. "include/grpc/support/atm_windows.h",
  8. "include/grpc/support/sync_custom.h",
  9. "include/grpc/support/sync_posix.h",
  10. "include/grpc/support/sync_windows.h",
  11. "include/grpc/support/tls_gcc.h",
  12. "include/grpc/support/tls_msvc.h",
  13. "include/grpc/support/tls_pthread.h",
  14. "include/grpc/impl/codegen/atm_gcc_atomic.h",
  15. "include/grpc/impl/codegen/atm_gcc_sync.h",
  16. "include/grpc/impl/codegen/atm_windows.h",
  17. "include/grpc/impl/codegen/sync_custom.h",
  18. "include/grpc/impl/codegen/sync_posix.h",
  19. "include/grpc/impl/codegen/sync_windows.h"}
  20. grpc_public_headers = {
  21. file for lib in libs for file in lib.get('public_headers', [])
  22. if lib.name in ("grpc", "gpr")
  23. }
  24. event_engine_files = {
  25. file for file in grpc_public_headers if 'event_engine' in file
  26. }
  27. def un_dir(files):
  28. return {f.split ('/', 2)[2] for f in files}
  29. def header_lines(files):
  30. return ('\n ').join('header "%s"' % f for f in files)
  31. def textual_header_lines(files):
  32. return ('\n ').join('textual header "%s"' % f for f in files)
  33. %>
  34. framework module grpc {
  35. umbrella header "grpc.h"
  36. ${header_lines(
  37. sorted(un_dir(grpc_public_headers - event_engine_files -
  38. textual_headers)))}
  39. ${textual_header_lines(
  40. sorted(un_dir(grpc_public_headers.intersection(textual_headers) -
  41. event_engine_files)))}
  42. export *
  43. module * { export * }
  44. }