Update git submodules
* Update system/tools/aidl from branch 'main'
to f93d2af893a4f0287d658676f73608a650c6e736
- Make memory layout of fixed-size types in rust match C
This commit adds a `repr(C, align(x))` attributes to rust
structs generated for fixed size parcelables and aidl enums
to make the memory layout match what we expect from C/C++.
It also adds `repr(C, tag, align(x))` to rust enums
generated for fixed-size aidl unions to match the layout of
a u8 tag followed by a union of the enum variants. This
ensures that using MessageQueue<u8> as the basis for adding
Fast Message Queue support in rust is valid. This commit
also updates the golden test output.
Bug: 294698705
Test: atest aidl_integration_test
Change-Id: I0697ffce0eadea01991588030aac01ebda36490c
- Add test for FixedSize parcelables with double and long fields
Since `double` and `long long` are aligned to 4 bytes on x86
(instead of 8 as expected) parcelables with these fields may
have different padding on different archs unless it's
handled explicitly. This commit adds a test case for this to
ensure that memory layouts match for the NDK and rust
backends. The NDK backend currently handles this by manually
aligning fields while the rust backend will manually insert
padding in a follow-up CL.
Bug: 294698705
Test: m aidl_integration_test
Change-Id: I67a0e90ba4c7b87adb1314b5e62c5274c5ef1682
- 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
1 file changed