commit | 333a6d2f842fdf8938aeae5fea0295fe2d7c6bcd | [log] [tgz] |
---|---|---|
author | Yifan Hong <elsk@google.com> | Thu Jan 12 12:28:02 2017 -0800 |
committer | Yifan Hong <elsk@google.com> | Thu Jan 12 12:35:18 2017 -0800 |
tree | fee52b9187389e3b8146df0c2112f93f8bb82719 | |
parent | 805ab52a99f79de30b1e246e5f9c7ed85648fb25 [diff] |
Do not allow package with missing version e.g. android.hardware.foo::IFoo is not allowed. Also, the regex rules in hidl-gen_l.ll and in FQName.cpp was not consistent (optional version in hidl-gen_l.ll but only minor version is optional in hidl-gen_y.yy). Hence android.hardware.foo::IFoo has always been not allowed. Still, the "?" is removed in both to make the rules consistent, and there are explict checks in FQName::setTo and FQName::applyDefaults to prevent this. Test: compiles with mma Change-Id: I9fd0a474c0313ab7c86c37f58f081a2c5a9b559c
croot make hidl-gen
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