Commit Graph

231 Commits

Author SHA1 Message Date
Jayant Chowdhary
f3b4f543b7 Merge "Fix clang API usage for record / enum link names."
am: 53840136c6

Change-Id: I7abbd779265a1efef7fc3d32b3e69e86c6c226f9
2017-06-27 01:01:46 +00:00
Treehugger Robot
53840136c6 Merge "Fix clang API usage for record / enum link names." 2017-06-27 00:56:28 +00:00
Jayant Chowdhary
b88146b0c1 Fix clang API usage for record / enum link names.
1) Also, emit all mangled symbols for constructors.

2) Add a shared object file parser to libheader-abi-util to filter out
   functions and global variables without DEFAULT or PROTECTED visibility.

3) Update expected tests.

Bug: 62721815

Bug: 62463617

Bug: 62307940

Test: Build libclang with "-UNDEBUG", mm -j64 on external/libcxx

Test: Both C1 and C2 constructors are generated for records.

Change-Id: Id5440a647fe41d27cb857a7d0e06429e28e45d8b
2017-06-26 12:10:39 -07:00
Vijay Venkatraman
0ba2287d20 Merge "Added fixing of log.h errors" am: 3931e177ad
am: c1b7753244

Change-Id: Ibe862f5dd873679c9df323b9cc80f91975b8a4b8
2017-06-23 07:51:08 +00:00
Treehugger Robot
3931e177ad Merge "Added fixing of log.h errors" 2017-06-23 07:42:33 +00:00
Logan Chien
e2033ebfce Merge "vndk-def: Add --enumerate to deps-closure" am: c5efdcc746
am: 52f4573ee6

Change-Id: Id0d3d5c0dd6f07c942d65d29b85651b31d4f8ef8
2017-06-16 11:49:12 +00:00
Logan Chien
9b70b376c3 vndk-def: Add --enumerate to deps-closure
This commit adds --enumerate to deps-closure so that a user can print
the dependency closure for each specified libraries or all libraries.

Bug: 62644173
Test: ./vndk_definition_tool.py deps-closure \
--system ... --vendor ...  --enumerate

Change-Id: I18bb27be10c565538356f774cc6752f8cfc79bd4
2017-06-16 17:30:09 +08:00
Logan Chien
c7b9511ad3 Merge "vndk-def: Add --revert flag to deps-closure" am: 23a60824bf
am: 576a906e8a

Change-Id: I5e73a5021abf82743ad1305dffd1af3905215a8b
2017-06-16 03:01:41 +00:00
Logan Chien
1cd902f597 vndk-def: Add --revert flag to deps-closure
This commit adds --revert flag to deps-closure so that a user can list
the transitive users of a library.

Bug: 62644173
Test: ./vndk_definition_tool.py deps-closure --revert /system/lib/libc.so ...
Change-Id: I03aab8d629c88074d6111659853b1396d87326ad
2017-06-15 17:46:12 +08:00
Logan Chien
3f9596c384 Merge "vndk-def: Fix check-dep errors on vendor_libs" am: 9a882a68a1
am: a2e0e4e514

Change-Id: Ia49b181001a81d491bf639a1421294e5816a2867
2017-06-13 04:40:39 +00:00
Vijay Venkatraman
f374b9f5df Added fixing of log.h errors
Test: make >log 2>&1 && parse-and-fix-errors.sh
Change-Id: I2ad4ef42098e8bcfdf3e5d2731c5c87f374a6bb2
2017-06-12 09:32:34 -07:00
Logan Chien
ba097bb576 vndk-def: Fix check-dep errors on vendor_libs
This commit fixes a check-dep bug introduced by 7e723126e4.  In
7e723126e4, graph.lib_pt[PT_VENDOR].values() was changed to return an
iterator instead of a set.  This means we can only traverse the iterator
once, thus vendor-to-vendor dependencies were treated as ineligible
dependencies.  This commit fixes the problem by creating a set() object
from the iterator, so that `vendor_libs` can be used several times.
This also makes it faster to lookup an object.

Test: Run `vndk_definition_tool.py check-dep` against sailfish images
and vendor-to-vendor dependencies should not show up.

Change-Id: I3b36efa635220941278c491b83f308a65e9f0ffe
2017-06-12 18:33:10 +08:00
Logan Chien
9abd194e44 Merge changes I5482a45a,I0185e169,Ic17c5e1d am: 06d5da59ac
am: e110e665d2

Change-Id: Ifb1420a32127de349af0ab1bdd832c99df49d3ee
2017-06-09 17:02:45 +00:00
Logan Chien
7a8bc4db10 vndk-def: Add tag file support to deps-insight
This commit generalizes tag file support so that deps-insight won't
follow the dependencies to ineligible vndk-sp/vndk libs.

Bug: 37867089
Test: libandroid.so will not be tagged as vndk in the html output of
deps-insight tool.

Change-Id: I5482a45acf4232ae7fac1210043ca868b28211ff
2017-06-09 20:56:36 +08:00
Logan Chien
5ad8d0fe74 vndk-def: Add more output formats to vndk command
This commit adds the --output-format option to vndk command.  When
`make` is specified, VNDK definition tool will fill in the placeholders
in the boilerplates and print a make file to stdout.

Bug: 37867089
Test: ./vndk_definition_tool.py vndk --output-format=make ...
Change-Id: I0185e1690264d0cefafa8536db2e0cf34daaeee0
2017-06-09 20:56:35 +08:00
Logan Chien
b68f26d281 vndk-def: Simplify VNDK result
This commit adds extra_vendor_libs and removes extra_vndk_sp_indirect.
With this modification, we can tag each libraries with either vndk_ext,
extra_vendor_libs, vndk_sp_ext or vndk_sp_indirect_ext.

After tagging them precisely, we merge them into vndk_sp, vndk_sp_ext
and extra_vendor_libs before printing the simplified VNDK list.  This
will give us accurate tags when --full is specified and give concise
tags when --full is not specified.

Bug: 37867089
Test: 3 essential sets are printed when --full was not specified.
Change-Id: Ic17c5e1dd4420050217e9724f86516c21609f899
2017-06-09 20:55:59 +08:00
Logan Chien
f0123915e9 Merge "vndk-def: Remove "follow" from default action" am: a802f73190
am: 8cf70cd832

Change-Id: I7a16699079e24a58a6e6a715ed49138677f05de9
2017-06-09 07:20:33 +00:00
Logan Chien
a36a9c5ea5 Merge changes I526f653e,Iefacd446 am: 72bc6acd53
am: f7502df5bb

Change-Id: I1624774bab428f6986f2bb44a98143b599ed88a4
2017-06-09 05:08:24 +00:00
Logan Chien
8e208817a3 vndk-def: Remove "follow" from default action
This commit removes `follow` option from the default actions to handle
ineligible vndk and vndk-sp usages.  We prefer to stop at ineligible
libs instead of pulling all ineligible dependencies.

Bug: 37867089
Test: libandroid.so is not tagged as vndk by default with sailfish images.
Change-Id: Iafeb27bb2c658fc07916517033fbedcc9cdd84eb
2017-06-09 13:04:03 +08:00
Logan Chien
1715340334 vndk-def: Add libz.so back to LL-NDK
This commit adds libz.so back to LL-NDK because the change to move
libz.so to VNDK-SP breaks some CTS testcases (which assume there is only
one libz.so under /system/lib[64].)

Whether this is a short-term temporary fix or a long-term solution will
be discussed or updated in b/37617391.

Bug: 62195853
Bug: 37867089
Bug: 37617391

Test: ./tests/test_ndk_libs.py
Test: ./tests/run.py
Test: libz.so tagged as LL-NDK with sailfish images.

Change-Id: I526f653e6141d658ee19e79eefd44d379ecac0dc
2017-06-09 10:08:55 +08:00
Logan Chien
16538ed728 vndk-def: Add libandroid_net to LL-NDK
Test: ./tests/test_ndk_libs.py
Test: libandroid_net.so is tagged as LL-NDK.
Change-Id: Iefacd4464e7d94577119532c11435e70404ea026
2017-06-09 10:00:59 +08:00
Logan Chien
bfd34eb458 Merge changes I76bc41e1,I77d8f66d,Icc3b07bc,I7a3b2534,Iad5db641, ... am: 16f10f2aaf
am: 2a18d59a1c

Change-Id: I89821849c797e12c14e71b20f3a16918842ea7a8
2017-06-09 01:45:40 +00:00
Treehugger Robot
16f10f2aaf Merge changes I76bc41e1,I77d8f66d,Icc3b07bc,I7a3b2534,Iad5db641, ...
* changes:
  vndk-def: Implement VNDK-SP-Ext collection
  vndk-def: Collect non-AOSP libs must be copied
  vndk-def: Exclude vndk-sp from vndk
  vndk-sp: Fix vndk-sp-unused computation
  vndk-def: Add (vndk-sp)? to fwk-only-rs matching
  vndk-def: Exclude vndk-sp/vndk from ndk-indirect
  vndk-def: Parse actions for ineligible libs
  vndk-def: Fix vndk-indirect computation bug
2017-06-09 01:37:09 +00:00
Vijay Venkatraman
0d1a7fc4be Merge "Added check for vendor module to parse-and-fix-errors" am: a198d93cc6
am: 90dc3bdcce

Change-Id: I20dce2b69a50639bb8a1bb3d535b4d3acb598429
2017-06-08 21:11:47 +00:00
Vijay Venkatraman
a198d93cc6 Merge "Added check for vendor module to parse-and-fix-errors" 2017-06-08 20:54:40 +00:00
Logan Chien
489dabb278 vndk-def: Implement VNDK-SP-Ext collection
This commit implements the VNDK-SP-Ext properly so that the output will
copy missing VNDK-SP-Indirect to /vendor/lib[64]/vndk-sp.

Bug: 37867089
Bug: 37940694
Test: Add/remove generic reference dump and make sure vndk-sp libs will
be listed as extra_vndk_sp_indirect.

Change-Id: I76bc41e189e566c66c6f96db9555d366921b7995
2017-06-09 02:08:14 +08:00
Logan Chien
6a2fcac08d vndk-def: Collect non-AOSP libs must be copied
This commit collects all non-AOSP system libraries that are used by
vendor modules and add them to vndk-ext so that they are copied into
vendor partition.

Bug: 37867089
Test: Some vendor HIDL interface libs are tagged with vndk-ext given
sailfish images.

Change-Id: I77d8f66d97b403991593d5b1f88573411e96d679
2017-06-09 01:04:56 +08:00
Logan Chien
89015efb13 vndk-def: Exclude vndk-sp from vndk
This commit excludes vndk-sp libraries from vndk result sets.  This CL
eliminates several false warnings on vendor usages on libhwbinder.so

Bug: 37867089
Test: Warnings on libhwbinder.so usages disappeared given sailfish
images.

Change-Id: Icc3b07bc6a57e41a3fcbaf116c1316f77e7a439d
2017-06-09 00:20:12 +08:00
Logan Chien
55a41a3dd9 vndk-sp: Fix vndk-sp-unused computation
This commit removes vndk-sp-indirect libs from vndk-sp-unused.  They
are actually being used (although indirectly).

Bug: 37867089
Test: libhwbinder.so is removed from vndk-sp-unused given sailfish images.
Change-Id: I7a3b253408c53f1d81d1fea39f79e3fe09f6fb75
2017-06-09 00:15:12 +08:00
Logan Chien
6582daf969 vndk-def: Add (vndk-sp)? to fwk-only-rs matching
This commit adds (?:vndk-sp)? to FWK-ONLY-RS matching because some
targets have a copy of libft2.so in /system/lib[64]/vndk-sp but we still
want to treat it as FWK-ONLY-RS.

Bug: 37867089
Test: libft2.so is not labeled as vndk-sp-indirect in sailfish image.
Change-Id: Iad5db6417573f3e25bad5c027cb547d9df4be23a
2017-06-09 00:12:48 +08:00
Logan Chien
05a13ae43f vndk-def: Exclude vndk-sp/vndk from ndk-indirect
This commit excludes VNDK-SP and VNDK libs from LL-NDK-INDIRECT and
SP-NDK-INDIRECT libs because in the degenerated VNDK design, FWK-ONLY
libs and VNDK libs share the same file.

Bug: 37867089
Test: All eligible VNDK libs are not tagged with LL-NDK-Indirect and
SP-NDK-Indirect with sailfish image.
Change-Id: I05b20e9d21543d63c1e75896f20e49c3dc0d70de
2017-06-09 00:12:35 +08:00
Logan Chien
2a5a2dd524 vndk-def: Parse actions for ineligible libs
This commit extracts the code to parse the action when ineligible
vndk-sp or vndk libs occur.

Bug: 37867089
Test: All --action-ineligible-vndk-sp options worked as usual.
Test: All --action-ineligible-vndk options worked as usual.
Change-Id: Ifc06598b1acff828479d804323711ae0da6e7215
2017-06-09 00:05:51 +08:00
Logan Chien
484219c317 vndk-def: Fix vndk-indirect computation bug
This commit replaces a vndk_indirect with vndk because we are computing
the indirect dependencies of vndk (i.e. closure(vndk) - vndk).

Bug: 37867089
Test: vndk-indirect libs are printed with sailfish images.
Change-Id: I218333c7dbb2a372cc9d170f34674510cc01aa0e
2017-06-09 00:05:35 +08:00
Logan Chien
cf2cfe8d7e Merge changes I45a82bf8,I80f3ee4e,I5aad29fa,Id415642b am: 23443b05bd
am: 89e6b703ec

Change-Id: I4838bd1300f0bcd1e23cbbfe7020da581182393c
2017-06-08 04:43:05 +00:00
Treehugger Robot
23443b05bd Merge changes I45a82bf8,I80f3ee4e,I5aad29fa,Id415642b
* changes:
  vndk-def: Add --system-dir-ignored option
  vndk-def-tool: Update README.md
  vndk-def: Implement degenerated VNDK for o-release
  vndk-def: Introduce better eligible list
2017-06-08 04:36:34 +00:00
Vijay Venkatraman
8856a28781 Added check for vendor module to parse-and-fix-errors
Fixed bug where modules with _int in their name are parsed incorrectly

Test: make >log 2>&1 && parse-and-fix-error.sh
Change-Id: Id42c7dd87e66b0932d7def7e01ca84b35d962e27
2017-06-07 15:32:58 -07:00
Logan Chien
47f5097cf8 vndk-def: Add --system-dir-ignored option
This commit adds --system-dir-ignored option so that the user can
ignore /system/vendor directory and run the following command on some
devices:

    python3 vndk_definition_tool.py vndk \
      --system ${ANDROID_PRODUCT_OUT}/system \
      --system-dir-ignored vendor \
      --vendor ${ANDROID_PRODUCT_OUT}/vendor

Test: ./tests/run.py
Test: Add --system-dir-ignored to make sure /system/vendor on some
devices are not treated as system modules.

Change-Id: I45a82bf81f2e2a6b34c146310f53d47dfe2313c3
2017-06-08 02:11:59 +08:00
Logan Chien
5947a9a23d vndk-def-tool: Update README.md
This commit updates readme instructions to match with the simplified
VNDK in O workflow.

Test: Run the described command lines with sailfish directories.
Change-Id: I80f3ee4eac34fae772ba6c336e457f537cb8312c
2017-06-08 00:46:10 +08:00
Logan Chien
7e723126e4 vndk-def: Implement degenerated VNDK for o-release
This commit implements the degenerated directory layout for o-release.
This commit also simplifies the output significantly.

Test: Run vndk_definition_tool.py against o-release images.
Change-Id: I5aad29fa4ff7e819778d26d2e2011af1be61bb58
2017-06-08 00:46:07 +08:00
Logan Chien
c72d920d6c Merge changes I25465f6d,I55d4b4e3,I0bb11de7,Ibb76bd59,I7bf782fa am: 3dffcb17b3 am: f2be491724
am: 49e55b0d06

Change-Id: I92803cd6688f91680e45793b9254aff3e28079c8
2017-06-02 03:43:30 +00:00
Logan Chien
3dffcb17b3 Merge changes I25465f6d,I55d4b4e3,I0bb11de7,Ibb76bd59,I7bf782fa
* changes:
  vndk-def: Add libvndksupport to LL-NDK
  vndk-def: Update vndk-sp list
  vndk-def: Remove obsolete warning options
  vndk-def: Add `--aosp-system` option
  vndk-def: Remove unused code.
2017-06-02 03:30:36 +00:00
Logan Chien
d31eb32940 vndk-def: Introduce better eligible list
This commit adds TaggedLibDict to read eligible list from CSV files and
decide whether a lib is visible to another module.

Note: The file format for eligible-list.csv has been changed.  Prepend
library names with `/system/${LIB}/`, e.g. `/system/${LIB}/libc.so`.

Test: ./tests/test_tagged_lib_dict.py
Test: ./tests/run.py
Change-Id: Id415642b7a5609a3cf791364519a443a6c17c1a3
2017-06-02 10:00:08 +08:00
Hsin-Yi Chen
6f4b00f52a Merge "Strip more SymbolInfo from dump" am: ddd86bd217 am: 8cf3e6c7d2
am: d6bde12a27

Change-Id: Ib68567b05aee577fbd19e89551b9d6f4be39b27f
2017-05-31 05:28:32 +00:00
Hsin-Yi Chen
6573ce0115 Strip more SymbolInfo from dump
Test: ./strip_debug_info.pl libhidlbase.so.dump
Bug: 37488823
Change-Id: Ifa18edf45cd5310633bec7ab0cb85018d4c74c9a
2017-05-26 17:35:48 +08:00
Jayant Chowdhary
cdeccd8b05 Merge "Add more flexibility to abi checking." am: 9bfbde9ef9 am: 89754eb489
am: a6062e94ea

Change-Id: I2c5519b464a8249699c655729d18509461d3f65d
2017-05-24 18:48:08 +00:00
Treehugger Robot
9bfbde9ef9 Merge "Add more flexibility to abi checking." 2017-05-24 18:34:35 +00:00
Logan Chien
df9de8d4e9 vndk-def: Add libvndksupport to LL-NDK
This commit adds libvndksupport.so to LL-NDK list.  libvndksupport.so
is a wrapper library over some platform-only libdl.so APIs.

Test: ./tests/test_ndk_libs.py
Change-Id: I25465f6d94441a22da3bf9a7c8417e2388c764da
2017-05-25 01:11:41 +08:00
Logan Chien
9435d22d7c vndk-def: Update vndk-sp list
This commit updates the vndk-sp list according to b/36705501.  Some
libs are still under discussion and might be removed in the future.

Bug: 36705501
Test: ./tests/test_elf_linker.py
Change-Id: I55d4b4e31ac326218f2048f69b7a9a2c51045291
2017-05-25 01:11:36 +08:00
Logan Chien
9ebe7bfc7f vndk-def: Remove obsolete warning options
This commit removes `--warn-high-level-ndk-deps` and
`--warn-banned-vendor-lib-deps`.  These options are removed in favor of
the eligible vndk list.  In next CL, a user can specify an eligible VNDK
list with `--tag-file`. VNDK definition tool will print warnings if
vendor modules are using ineligible framework libraries.

Test: ./tests/run.py
Change-Id: I0bb11de70c93f1447bb041561e80e342aa400fd4
2017-05-24 23:47:00 +08:00
Logan Chien
51b083038f vndk-def: Add --aosp-system option
This commit adds `--aosp-system` option to simplify the command line
usages.  The user can specify the aosp image system directory directly
and skip the `create-generic-ref` subcommand.

Test: Compare the output with `--load-generic-refs` and `--aosp-system`.
Change-Id: Ibb76bd59ea504808545775562feefcd8a95ee267
2017-05-24 22:02:16 +08:00