Add static asserts for memory layout of fixed-size NDK types

This adds static asserts on AIDL-generated types to ensure
that their memory layout matches what we expect from rust's
`repr(C)` attribute and make sure that using
`MessageQueue<u8>` as the basis for adding Fast Message
Queue support in rust is valid. This commit also adds tests
for arrays in FixedSize parcelables and unions with varying
amounts of tag padding and updates golden output.

Bug: 294698705
Test: atest aidl_integration_test
Change-Id: I243e13f975487a7ed11aeb29ae4772dabb4afee7
5 files changed
tree: 5daecc9625014413e4813e176d535cb8b56943a7
  1. aidl_api/
  2. analyzer/
  3. build/
  4. metadata/
  5. scripts/
  6. tests/
  7. trace/
  8. aidl-format.sh
  9. aidl.cpp
  10. aidl.h
  11. aidl_checkapi.cpp
  12. aidl_checkapi.h
  13. aidl_const_expressions.cpp
  14. aidl_dumpapi.cpp
  15. aidl_dumpapi.h
  16. aidl_language.cpp
  17. aidl_language.h
  18. aidl_language_l.ll
  19. aidl_language_y.yy
  20. aidl_to_common.cpp
  21. aidl_to_common.h
  22. aidl_to_cpp.cpp
  23. aidl_to_cpp.h
  24. aidl_to_cpp_common.cpp
  25. aidl_to_cpp_common.h
  26. aidl_to_java.cpp
  27. aidl_to_java.h
  28. aidl_to_ndk.cpp
  29. aidl_to_ndk.h
  30. aidl_to_rust.cpp
  31. aidl_to_rust.h
  32. aidl_typenames.cpp
  33. aidl_typenames.h
  34. aidl_unittest.cpp
  35. Android.bp
  36. ast_java.cpp
  37. ast_java.h
  38. ast_java_unittest.cpp
  39. check_valid.cpp
  40. check_valid.h
  41. CleanSpec.mk
  42. code_writer.cpp
  43. code_writer.h
  44. code_writer_unittest.cpp
  45. comments.cpp
  46. comments.h
  47. diagnostics.cpp
  48. diagnostics.h
  49. diagnostics.inc
  50. diagnostics_unittest.cpp
  51. generate_aidl_mappings.cpp
  52. generate_aidl_mappings.h
  53. generate_cpp.cpp
  54. generate_cpp.h
  55. generate_cpp_analyzer.cpp
  56. generate_cpp_analyzer.h
  57. generate_cpp_unittest.cpp
  58. generate_java.cpp
  59. generate_java.h
  60. generate_java_binder.cpp
  61. generate_ndk.cpp
  62. generate_ndk.h
  63. generate_rust.cpp
  64. generate_rust.h
  65. hiddenapi-greylist
  66. import_resolver.cpp
  67. import_resolver.h
  68. io_delegate.cpp
  69. io_delegate.h
  70. io_delegate_unittest.cpp
  71. location.cpp
  72. location.h
  73. logging.cpp
  74. logging.h
  75. main.cpp
  76. NOTICE
  77. options.cpp
  78. options.h
  79. options_unittest.cpp
  80. os.h
  81. OWNERS
  82. parser.cpp
  83. parser.h
  84. permission.cpp
  85. permission.h
  86. preprocess.cpp
  87. preprocess.h
  88. PREUPLOAD.cfg
  89. README.md
  90. run_integration_tests.sh
  91. TEST_MAPPING
README.md

Documentation for this project is currently maintained here:

https://source.android.com/devices/architecture/aidl/overview