Commit Graph

21143 Commits

Author SHA1 Message Date
Logan Chien
4e5ccdcc67 vndk-def: Return ELFLinkData for unit test.
Test: ./tests/test_elf_linker.py
Change-Id: I327a085d5b97708aa2e0b11192591284025163d0
2017-03-07 13:00:37 +08:00
Logan Chien
30127d7edd vndk-def: Refactor BannedLibDict and add unittests.
This commit refactors BannedLibDict and add 3 unittests.

Test: ./tests/test_banned_libs.py
Change-Id: I8a5b67e8ca4135a81e1f7acb66281d3d1b8bffed
2017-03-07 13:00:37 +08:00
Logan Chien
1acc95db00 vndk-def: Separate SP-NDK from HL-NDK.
This commit separates SP-NDK from HL-NDK.  In the latest design, to
allow HIDL Executables / Libs to use OpenGL-related libraries, SP-NDK is
spun off from HL-NDK.

Test: ./tests/test_ndk_libs.py
Change-Id: Ifafd71df8c517d88fb50d5027f4fcfec76ed5d4f
2017-03-07 13:00:37 +08:00
Logan Chien
3ad3499f69 vndk-def: Move test_elfdump.py data into testdata.
This commit moves `input` and `expected` into `testdata/test_elfdump`
subdirectory.

Test: ./tests/test_elfdump.py
Change-Id: I53773471d36c26df736b066f4d00f76a2707459f
2017-03-07 13:00:37 +08:00
Treehugger Robot
4a67eaddd6 Merge "Optimization : Do not recurse into unexported Abi." 2017-02-24 20:11:20 +00:00
Treehugger Robot
efb1cb1089 Merge "Backport the inlines for cfsetspeed and tcdrain." 2017-02-23 20:57:56 +00:00
Dan Albert
3b59037af3 Backport the inlines for cfsetspeed and tcdrain.
This fixes some issues with using boost's asio (which wrongly assumes
_BSD_SOURCE implies that these things are available) following our
change from -isystem to --sysroot.

Test: Manual, check that we can build when using cfsetspeed on ICS.
Bug: https://github.com/android-ndk/ndk/issues/302
Change-Id: Iab50221e4864f9a09a8fb00691252170eb6e8d09
2017-02-23 11:24:00 -08:00
Treehugger Robot
c5a534236e Merge changes from topic 'vndk-def-tool'
* changes:
  vndk-def: Cleanup ELF linker test cases.
  vndk-def: Implement ELF resolver.
  vndk-def: Fix python2 unittest.
  vndk-def: Separate DT_RUNPATH with semicolon.
  vndk-def: Process import symbols.
  vndk-def: Rename Graph to ELFLinker.
  vndk-def: Refactor exported symbols.
2017-02-21 06:24:45 +00:00
Logan Chien
32d21642db vndk-def: Cleanup ELF linker test cases.
Test: ./tests/run.py

Change-Id: I219fba79224b547f47b9fef3aac808e9c9d22eab
2017-02-20 19:56:05 +08:00
Logan Chien
94acf17619 vndk-def: Implement ELF resolver.
This commit implements ELF resolver so that we can change the default
search path and check the search directories specified in DT_RUNPATH.

Test: ./tests/run.py

Change-Id: I479d0cb1519032053c5813c003a959adde8fb05e
2017-02-18 14:42:47 +08:00
Logan Chien
ca29b9d733 vndk-def: Fix python2 unittest.
Test: python2 ./tests/run.py

Change-Id: I8c2d9e91652aa9529fc9f3a58e374883626f7dd7
2017-02-18 14:38:51 +08:00
Logan Chien
ebf8c4f967 vndk-def: Separate DT_RUNPATH with semicolon.
This commit splits DT_RPATH and DT_RUNPATH with semicolon so that an
ELF object file can specify multiple search paths.

Test: ./tests/run.py

Change-Id: Ib4d31177651a66bb205801f5fb1293c60452984d
2017-02-18 14:38:51 +08:00
Logan Chien
1129f527ce vndk-def: Process import symbols.
Test: ./tests/run.py

Change-Id: I47b7db8f93fdf9f716259c20de083b285afb5929
2017-02-18 11:55:13 +08:00
Logan Chien
69b46334fc vndk-def: Rename Graph to ELFLinker.
Test: ./tests/run.py

Change-Id: I5735250b095ac2d9f49abc9d4dd6ef5fbedc6068
2017-02-18 11:55:12 +08:00
Jayant Chowdhary
33eb4e5325 Optimization : Do not recurse into unexported Abi.
Test: header-abi-dumper -o example1.dump tests/input/example1.cpp -I
      tests -- -x c++ -std=c++11 -I . -I
      ~/android/aosp/external/clang/lib/Headers
      example1.dump does not contain abi information not present in
      tests/ .
Change-Id: Ia48e24cca14ac94e8e5b3c823243245d2994cdf9
2017-02-17 12:52:52 -08:00
Treehugger Robot
4f4b426e06 Merge "Added header-abi-diff." 2017-02-16 20:05:07 +00:00
Logan Chien
d22c3eed04 vndk-def: Refactor exported symbols.
Test: ./tests/run.py

Change-Id: Ie9aafc88e1b4bab217f1106f8a7ca7168ecfa0c6
2017-02-16 19:28:38 +08:00
Jayant Chowdhary
064e7d8291 Added header-abi-diff.
header-abi-diff takes two input dumps produced by header-abi-dumper and
produces an abi compatiblity report.

header-abi-dumper, header-abi-linker now produce dumps formatted only in
protobuf TextFormat.

Test: Dump the abi exposed by test/input/example1.cpp. Add fields, change
      return types of functions and dump the abi of this version. Produce the
      compatibility report by: header-abi-diff -old <ver1-dump> -new <ver2-dump>
      -o <compatibility-report>.
      Also tested changing the abi of libjpeg, and comparing a reference
      dump with the new dump. An Abi breakage is reported.

Bug: 32750600

Change-Id: I5444912d84de726aaa18977ca9162162aa13b760
2017-02-15 18:26:20 -08:00
Treehugger Robot
d535b7207a Merge "Include pre-generated copy of api-versions DO NOT MERGE" 2017-02-15 02:24:28 +00:00
Siva Velusamy
7f3417f336 Include pre-generated copy of api-versions DO NOT MERGE
This CL changes the api-versions.xml file released in platform tools
to correspond to what was checked into prebuilts rather than what
is being generated by the build. The version generated by the AOSP
build is incorrect for release, but we are now moving to releasing
platform tools from AOSP. In addition, this file will be removed
from platform tools after a few releases (it will be available from
the platform component instead).

Test: make win_sdk sdk_repo and check the included api-versions.xml
Change-Id: I0c3dd3c99ec0c852e7cf8d86b83e298e157044d2
2017-02-14 13:09:59 -08:00
Colin Cross
956ee36d17 Merge "Use asm-5.2 prebuilts" 2017-02-14 19:03:46 +00:00
Treehugger Robot
3d786f4e50 Merge changes Id48b8cf6,I6ecf45ca,Ic672706d
* changes:
  vndk-def: Add more unittests.
  vndk-def: Add gralloc-mapper to sp-hals.
  vndk-def: Code cleanup and refactoring.
2017-02-14 02:49:02 +00:00
Colin Cross
61967edf02 Use asm-5.2 prebuilts
Test: m -j checkbuild tests cts
Change-Id: I737c9293662d1e9a5c47f174f160b9fd88bb3b5f
2017-02-13 12:54:21 -08:00
Logan Chien
50f3768a7d vndk-def: Add more unittests.
This commit adds more unittests to test vndk_definition_tool.py
thoroughly.

Test: ./tests/run.py
Change-Id: Id48b8cf69021e0155d2075d86e03897a77432784
2017-02-13 20:52:47 +08:00
Logan Chien
a5a790c314 vndk-def: Add gralloc-mapper to sp-hals.
This commit fixes the name for gralloc-mapper so that
vndk_definition_tool.py can correctly find gralloc-mapper
implementation.

Test: ./vndk_definition_tool.py sp-hal --system ... --vendor ..

Change-Id: I6ecf45ca6fdb107ca1854f51d620888d5eeaed5b
2017-02-13 16:50:06 +08:00
Logan Chien
ba9f49806e vndk-def: Code cleanup and refactoring.
Test: ./tests/run.py
Change-Id: Ic672706d17d3d72a594422e0066cabbe678f65ce
2017-02-13 11:28:19 +08:00
Treehugger Robot
9ca75f0441 Merge "Revert "Remove unused library definitions."" 2017-02-10 21:02:23 +00:00
Dan Albert
e3742ec4ee Revert "Remove unused library definitions."
This reverts commit 45e5c53e91.

Reason for revert: jmgao's versioner is still using them
Bug: http://b/35243030

Change-Id: I17779695c443f3353082d122eacaffba5e5663d3
2017-02-10 19:14:30 +00:00
Treehugger Robot
23bfda4832 Merge "vndk-def: Support same-process HAL discovery." 2017-02-10 07:07:52 +00:00
Treehugger Robot
21432ba00c Merge changes If5f816a1,I9c4ff49a,I614a1fb0
* changes:
  vndk-abi: Add tool to collect all abi-dumps.
  vtable-dumper: Use command line library.
  vtable-dumper: Rename to vndk-vtable-dumper.
2017-02-10 03:45:38 +00:00
Logan Chien
735f14ec10 vndk-def: Support same-process HAL discovery.
This commit adds `sp-hal` subcommand to vndk_definition_tool.py.  It
will find vendor shared libraries with the name looks like same-process
HAL and compute its transitive closure.

Test: ./vndk_definition_tool.py sp-hal --system ... --vendor ...  --closure
Bug: 34396885
Change-Id: Id79e3eed214205d119b94cafb14f222f91022b7c
2017-02-10 09:34:42 +08:00
Logan Chien
957282b680 vndk-abi: Add tool to collect all abi-dumps.
Test: lunch ${TARGET} && make -jN && ./vndk_abi_dump.py
Bug: 33185435
Change-Id: If5f816a1a8a6dd878003d39a64fe47d802fb5e5b
2017-02-10 09:18:26 +08:00
Treehugger Robot
706089fff2 Merge "Remove unused library definitions." 2017-02-09 20:29:22 +00:00
Logan Chien
698178012c vtable-dumper: Use command line library.
This commit uses the command line library to parse the command line
options passed to vndk-vtable-dumper.

Test: ./tests/test_vndk_vtable_dumper.py
Change-Id: I9c4ff49a541f330173a2264d8b9124e0ed0ad99d
2017-02-09 14:56:24 +08:00
Logan Chien
7b7bdb760e vtable-dumper: Rename to vndk-vtable-dumper.
This commit renames llvm-figure-out-vtables to vndk-vtable-dumper.

Test: ./tests/test_vndk_vtable_dumper.py
Change-Id: I614a1fb0e8ddc89b32a8245322b0f198a363f6a0
2017-02-09 14:56:24 +08:00
Treehugger Robot
c28198423c Merge "Added header-abi-linker." 2017-02-08 18:03:03 +00:00
Treehugger Robot
8b2e00f022 Merge changes I02b369f1,If18be210,I0bdf76f8,I5fa64d60
* changes:
  vndk-def: Exclude banned libs from vndk set.
  vndk-def: Add path separator to the end of pattern.
  vndk-def: Add libselinux.so to blacklist.
  vndk-def: Refactor warnings for banned lib usages.
2017-02-08 10:30:01 +00:00
Jayant Chowdhary
75c61f0a40 Added header-abi-linker.
header-abi-linker links dumps produced by header-abi-dumper when it goes
over each source file in a vndk shared library. It simply looks at the
"mlinker_set_key" field of the protobuf message to do this.

Only abi information present in source files in "export_include_headers"
is dumped now. If a library does not export headers it's abi is not
dumped.

Added information about anonymous records. eg: typedef struct {} Foo;

Test: header-abi-dumper -o example1.dump tests/input/example1.cpp -I tests --
-x c++ -std=c++11 -I . -I ~/android/aosp/external/clang/lib/Headers/

Bug: 32750600

Change-Id: I692de0933349a6b80a6b1a3b605a377a25cd0b5a
2017-02-07 22:46:48 -08:00
Dan Albert
45e5c53e91 Remove unused library definitions.
These have all been migrated over to soong in the platform.

Test: ndk/checkbuild.py
Bug: None
Change-Id: Ie192e2145d68722f0915686cfec3bcd07bcd6bff
2017-02-07 13:28:23 -08:00
Logan Chien
df21f9885d vndk-def: Exclude banned libs from vndk set.
This commit removes banned libs from vndk output set.

Test: Run vndk_definition_tool.py against AOSP images and check whether
libbinder has been removed or not.

Change-Id: I02b369f15f51260469bb5bed19ead55121d51b9f
2017-02-07 19:33:21 +08:00
Logan Chien
07c478e471 vndk-def: Add path separator to the end of pattern.
This commit adds path separator to the end of regular expression pattern
for alternating path, which were specified with --system-dir-as-vendor
and --vendor-dir-as-system.  This prevents us from treating
/system/bin/hwservicemanager as vendor module.

Test: Run vndk_definition_tool.py against AOSP images.

Change-Id: If18be210b8e72d662de8bc7e30af27015c72eb9b
2017-02-07 19:19:31 +08:00
Logan Chien
dfb6f5df30 vndk-def: Add libselinux.so to blacklist.
Test: run vndk_definition_tool.py against AOSP images.
Change-Id: I0bdf76f83f18f592bcd6a856e963574dbbf7631a
2017-02-07 19:11:24 +08:00
Logan Chien
07bed33e41 vndk-def: Refactor warnings for banned lib usages.
This commit refactors the code to emit warnings to banned lib usages.

Test: run vndk_definition_tool.py against AOSP images.
Change-Id: I5fa64d60fc921d8bb5d291f7a54115a7ae87c628
2017-02-07 19:09:12 +08:00
Logan Chien
d662f90585 Merge "Add functional tests for header-abi-dumper." 2017-02-07 03:02:50 +00:00
Logan Chien
a0a1b68fea Merge "Code cleanup." 2017-02-07 03:00:30 +00:00
Logan Chien
18e0f6790d Merge "Remove dead cc_defaults for header-checker." 2017-02-07 03:00:12 +00:00
Logan Chien
e3d3bda3bb Add functional tests for header-abi-dumper.
This commit adds functional tests for header-abi-dumper.

Test: mm -j8 && ./tests/test.py
Change-Id: Ibc2f2200297720ca9ada7a5e039d40c9648a5d2a
2017-02-06 19:44:32 +08:00
Logan Chien
0f263ed5d4 Code cleanup.
Test: mm -j8
Change-Id: I269111becf3a4f3de74b2835be1238c24717a311
2017-02-06 18:03:41 +08:00
Logan Chien
98962975ef Remove dead cc_defaults for header-checker.
This commit removes dead cc_defaults `header-checker-lib-default` which
was originally for header-checker.  It doesn't work because we are not
shipping `libclang.so` in the prebuilts.

Test: mm -j8
Change-Id: I149437d045ab3371221aa7386e3cf78c387ae3bd
2017-02-06 16:44:56 +08:00
Treehugger Robot
37df8f4175 Merge "gdbclient: fix darwin sed problem" 2017-02-01 21:16:04 +00:00