commit | a7227fdac845ccbf30383bc6f60b08bcbda6057d | [log] [tgz] |
---|---|---|
author | Steven Moreland <smoreland@google.com> | Fri Mar 08 10:16:19 2019 -0800 |
committer | Steven Moreland <smoreland@google.com> | Tue Mar 12 13:19:03 2019 -0700 |
tree | ec668aff2c960a570a50c5967f3b3b59cbf8d821 | |
parent | 25ddda3a4d980aade74f5bd97b8b55d47289f010 [diff] |
Add '-java-shallow' library. Originally, we used to have '-java' and '-java-static' libraries. However, when the build system was updated so that a static java library could be used as either a shared library or a static library, these two module types are combined into just '-java' (since people could use this in both contexts). However, this introduced another problem. Imagine this scenario with interface IFoo inherits from IBar. java lib A - statically includes IFoo (using '-java') (implicitly statically includes IBar) - shared links B java lib B statically includes IBar (using '-java') Because '-java' always has static libs, IBar gets duplicated twice. This problem went unnoticed/unreported, but now that Android is being more strict about hiddenapi and classes duplicated on the class path, the build system has been erroring on this case. With this change, now the following is possible: java lib A statically includes IFoo (using '-java-shallow') java lib B statically includes IBar (using either version) Now IBar is no longer duplicated. Bug: 127875362 Test: manual Change-Id: Icc3ebf39fca4073cc24012351d6151bf8ea4642b
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
This tool generates html documentation for hal interfaces.
m hidl-doc && hidl-doc -h