commit | 4a385ed6b8c637c832cc351af43077a525633abb | [log] [tgz] |
---|---|---|
author | Steven Moreland <smoreland@google.com> | Mon Dec 09 14:47:18 2019 -0800 |
committer | Steven Moreland <smoreland@google.com> | Mon Dec 09 14:53:53 2019 -0800 |
tree | 2658b720e8813b0f35dcb4b0f8103883071d2a2d | |
parent | f6316c53165c249f09c7e340d4ef50253afa5cb2 [diff] |
Take advantage of moved get*Components result. In preparation to remove version from namespace in -Lc++-impl generation. Less code = happy. Bug: 145814082 Test: ./test/run_all_device_tests.sh Change-Id: Icd7339f76abdf091554a1db8fca44cd9898367ca
Full documentation can be found here: https://source.android.com/devices/architecture/hidl/
hidl-gen is a compiler for the HIDL (HAL Interface Design Language) which generates C++ and Java endpoints for RPC mechanisms. The main userspace libraries which this compiler uses can be found at system/libhidl.
m hidl-gen
Note that options for hidl-gen expected to be invoked by the build system are marked with 'internal' in the help menu.
hidl-gen -h hidl-gen -o output -L c++-impl -r android.hardware:hardware/interfaces -r android.hidl:system/libhidl/transport android.hardware.nfc@1.0
Some defaults for package roots are also provided
hidl-gen -o output -L c++-impl android.hardware.nfc@1.0 hidl-gen -o output -L vts android.hardware.nfc@1.0 hidl-gen -L hash android.hardware.nfc@1.0
Example command for vendor project
hidl-gen -L c++-impl -r vendor.foo:vendor/foo/interfaces vendor.foo.nfc@1.0
See update-makefiles-helper.sh and update-all-google-makefiles.sh for examples of how to generate HIDL makefiles (using the -Landroidbp option).
This is a helper tool to convert C headers to valid .hal files.
m c2hal && c2hal -h