Explicitly generate _vendor library.

Explicitly create '_vendor' copies of libraries so that
vendor code can link against the extensions. When this is
used, framework code should link against vendor.awesome.foo@1.0
and code on the vendor image should link against
vendor.awesome.foo@1.0_vendor. For libraries with the below extensions,
they will be available even on the generic system image.
Because of this, they should always be referenced without the
'_vendor' name suffix.

Note: vendor_available is still outputted even though
it is for the time being a no-op

Bug: 35813011
Bug: 62616897
Test: system hidl lib definitions are unchanged
Test: vendor hidl lib definitions include vendor definition
Merged-In: I9fcc4b4b6f2093fadec7a832413ae168d1ebcfb9
Change-Id: I9fcc4b4b6f2093fadec7a832413ae168d1ebcfb9
2 files changed
tree: 3952fd52b7e8ba6684fe0e1226a94fa83eda6f16
  1. c2hal/
  2. include_hash/
  3. test/
  4. utils/
  5. Android.bp
  6. Annotation.cpp
  7. Annotation.h
  8. ArrayType.cpp
  9. ArrayType.h
  10. AST.cpp
  11. AST.h
  12. CompoundType.cpp
  13. CompoundType.h
  14. ConstantExpression.cpp
  15. ConstantExpression.h
  16. Coordinator.cpp
  17. Coordinator.h
  18. DeathRecipientType.cpp
  19. DeathRecipientType.h
  20. EnumType.cpp
  21. EnumType.h
  22. FmqType.cpp
  23. FmqType.h
  24. generateCpp.cpp
  25. generateCppImpl.cpp
  26. generateJava.cpp
  27. generateVts.cpp
  28. HandleType.cpp
  29. HandleType.h
  30. Hash.cpp
  31. hidl-gen_l.ll
  32. hidl-gen_y.yy
  33. HidlTypeAssertion.cpp
  34. HidlTypeAssertion.h
  35. Interface.cpp
  36. Interface.h
  37. Location.h
  38. main.cpp
  39. MemoryType.cpp
  40. MemoryType.h
  41. Method.cpp
  42. Method.h
  43. MODULE_LICENSE_APACHE2
  44. NamedType.cpp
  45. NamedType.h
  46. NOTICE
  47. PointerType.cpp
  48. PointerType.h
  49. README.md
  50. RefType.cpp
  51. RefType.h
  52. ScalarType.cpp
  53. ScalarType.h
  54. Scope.cpp
  55. Scope.h
  56. StringType.cpp
  57. StringType.h
  58. Type.cpp
  59. Type.h
  60. TypeDef.cpp
  61. TypeDef.h
  62. update-makefiles-helper.sh
  63. VectorType.cpp
  64. VectorType.h
README.md

hidl-gen user guide

1. Build

croot
make hidl-gen

2. Run

hidl-gen -o output-path -L language (-r interface-root) fqname

output-path: directory to store the output files.
language: output file for given language. e.g.c++, vts..

fqname: fully qualified name of the input files.
For singe file input, follow the format: package@version::fileName
For directory input, follow the format: package@version

interface-root(optional): prefix and root path for fqname.
If not set, use the default prefix: android.hardware and default root path
defined in $TOP.

examples:

croot
hidl-gen -o output -L c++ -r android.hardware:hardware/interfaces -r android.hidl:system/libhidl/transport android.hardware.nfc@1.0::INfc.hal
hidl-gen -o output -L vts -r android.hardware:hardware/interfaces -r android.hidl:system/libhidl/transport android.hardware.nfc@1.0
hidl-gen -o test -L c++ -r android.hardware:hardware/interfaces -r android.hidl:system/libhidl/transport android.hardware.nfc@1.0