Commit Graph

21183 Commits

Author SHA1 Message Date
Logan Chien
69aa6de23d vndk-def: Rename vndk-core and vndk-ext libs.
This commit will rename vndk-core, vndk-fwk-ext, and vndk-vnd-ext
libraries so that the output will match with the post-Treble design
document.

Test: ./tests/test_vndk.py
Change-Id: I528ef380c76d71c743f1937ba94a8b72c00ce785
2017-03-20 21:44:06 +08:00
Logan Chien
285419aacd vndk-def: Rename map_path_to_lib(s) to get_lib(s).
Test: ./tests/run.py
Change-Id: Ia9140851996579a8b7175483c9daffe0de283237
2017-03-20 21:44:03 +08:00
Logan Chien
a4c4d370bb vndk-def: Rename ELFLinker.add() to add_lib().
Test: ./tests/run.py
Change-Id: If187486736d030ea4418beadd2fca7fe62362935
2017-03-20 21:43:53 +08:00
Logan Chien
6c81087023 vndk-def: Add non-AOSP lib to imported_ext_symbols.
This commit adds non-AOSP libraries to imported_ext_symbols even when no
symbols are resolved to that specific non-AOSP library.  This should fix
some errors related to the missing libraries from generic references.

Test: ./tests/run.py
Change-Id: I7f104737308d4dc0b591266d3408b001325c959e
2017-03-20 21:43:51 +08:00
Logan Chien
fc3dc99636 vndk-def: Skip ndk ext check if no generic-refs.
After this commit, vndk_definition_tool.py will skip the NDK extension
check if generic references are not specified by the user.  This fixes
an unexpected AttributeError on NoneType object.

Test: Run ./vndk_definition_tool.py vndk command w/o --generic-refs ...
Change-Id: Ibcd960039c5acc4adabb1a2e2b5965a026e9f23a
2017-03-20 21:43:49 +08:00
Treehugger Robot
6420708d76 Merge changes Id6d23112,I474dd0c0
* changes:
  vndk-def: Don't remove all deps in normalization.
  vndk-def: Add symbol usages in dependency dumps.
2017-03-16 05:23:38 +00:00
Logan Chien
3e641efbe6 vndk-def: Don't remove all deps in normalization.
This commit no longer removes all dependencies (including system and
vendor dependencies) when a generic reference library has a dependency
to a library on the vendor partition.  After this commit is merged,
vndk_definition_tool.py will only remove the offending dependencies.

Test: Run vndk_definition_tool.py against bullhead build with tweaked
dependencies.

Change-Id: Id6d23112128d9bbfec9e1e4430677a07f20fd193
2017-03-16 08:52:40 +08:00
Logan Chien
747715ae24 vndk-def: Add symbol usages in dependency dumps.
This commit dumps the symbol usages in the dependency.

Test: Run ./vndk_definition_tool.py deps --symbol ...
Change-Id: I474dd0c0184e6dabd06968f953137384e14862c2
2017-03-15 14:55:41 +08:00
Treehugger Robot
94af0f2003 Merge "Fix tests: export_include_dirs." 2017-03-13 22:36:33 +00:00
Treehugger Robot
1e7c8fe0da Merge "temporarily disable FORTIFY in header-abi-dumper" 2017-03-13 22:35:15 +00:00
George Burgess IV
7fef90146b temporarily disable FORTIFY in header-abi-dumper
Bionic's FORTIFY implementation expects clang >= r285906, but
header-abi-dumper uses external/clang, which is a clone of clang at
r275480. This causes header-abi-dumper to emit errors in cases where
clang-3688880 doesn't (e.g.

unsigned char c[2];
// error: no matching function, since clang r275480 doesn't like
// unsigned char * -> char * casts
snprintf(c, sizeof(c), "a");).

Bug: 36076947
Test: Ran header-abi-dumper on external/e2fsprogs/lib/blkid/probe.c
(which previously gave us errors). It now only emits a few warnings.

Change-Id: I9460853b7f94aeb154a4d921a852954d82394055
2017-03-13 20:09:23 +00:00
Jayant Chowdhary
293cb38a37 Fix tests: export_include_dirs.
Test: tests/test.py passes.

Change-Id: Id5dd4bf0939b7d51bcb63fa38a1237d62ae919ab
2017-03-10 13:58:35 -08:00
Treehugger Robot
edaab1ab96 Merge "vndk-def: Fix vndk-ext computation." 2017-03-10 14:45:36 +00:00
Treehugger Robot
e2a5490634 Merge "vndk-def: Remove dead code." 2017-03-10 14:45:21 +00:00
Logan Chien
c25a1ed85d vndk-def: Fix vndk-ext computation.
This commit fixes vndk-fwk-ext qand vndk-vnd-ext computation.  We should
hash imported_lib, an instance of ELFLinkData, instead of ELF object.

Test: ./tests/test_vndk.py
Change-Id: Idc5123bbf9980b76527b5fa295a1fe01c8f7f44c
2017-03-10 18:39:16 +08:00
Logan Chien
f9da0b4fab vndk-def: Remove dead code.
Test: ./tests/run.py
Change-Id: I4f6a05373a607e39e5836db062c8562702588240
2017-03-10 18:38:59 +08:00
Treehugger Robot
52c291d53c Merge "Package libwinpthread-1.dll in platform-tools." 2017-03-10 02:06:38 +00:00
Josh Gao
a920f75082 Package libwinpthread-1.dll in platform-tools.
Test: make PRODUCT-sdk-win_sdk
Change-Id: Ie21402331ca73a5c6e7cb5108a2fde386f357def
2017-03-09 16:00:52 -08:00
Treehugger Robot
067fec5c3f Merge changes Ie6600c35,I62bf6bb2
* changes:
  vndk-def: Add vndk-cap subcommand.
  vndk-def: Remove stale debug assertion.
2017-03-09 11:27:08 +00:00
Logan Chien
d42d07d762 vndk-def: Add vndk-cap subcommand.
This commit adds vndk-cap subcommand.  vndk-cap subcommand will compute
the upper bound of the eligible libraries for VNDK definition.

Test: ./tests/test_elf_linker.py
Change-Id: Ie6600c35735de36055b2770836f2e87397221ddd
2017-03-09 17:23:36 +08:00
Logan Chien
9788c86218 vndk-def: Remove stale debug assertion.
Test: ./tests/run.py
Change-Id: I62bf6bb2b20be155901c088fbca18d35a9cdd6ad
2017-03-09 17:23:36 +08:00
Treehugger Robot
68b3022d17 Merge "vndk-def: Update readme." 2017-03-09 07:03:15 +00:00
Logan Chien
4d3ba54e5b vndk-def: Update readme.
Test: ./tests/run.py
Change-Id: If07a726f47096e015ab19c23bedb024833a7e16f
2017-03-09 12:28:46 +08:00
Joachim Sauer
a824f044c3 Merge "Renaming Czech Republic to Czechia." 2017-03-08 17:31:27 +00:00
Treehugger Robot
b43dfb97b2 Merge "vndk-def: Implement latest VNDK heuristics." 2017-03-08 03:19:18 +00:00
Treehugger Robot
0092ef8928 Merge changes Ifed15e60,Icff8aeeb,I0365be01,I746b07a4
* changes:
  vndk-def: Remove dump_exported_symbols().
  vndk-def: Add parse from ELF dump file.
  vndk-def: Warn on bad user-specified dependencies.
  vndk-def: Split DT_NEEDED and dlopen() into two layers.
2017-03-08 01:53:57 +00:00
Treehugger Robot
6622d54caf Merge changes I3073efe9,I3b0f06e3,I4ca80033,I3bc23fd4,I327a085d, ...
* changes:
  vndk-def: Add GenericRefs.classify_lib().
  vndk-def: Link imported symbols.
  vndk-def: Add vndk-stable finder.
  vndk-def: Extract sp-hal finder.
  vndk-def: Return ELFLinkData for unit test.
  vndk-def: Refactor BannedLibDict and add unittests.
  vndk-def: Separate SP-NDK from HL-NDK.
2017-03-08 01:53:41 +00:00
Treehugger Robot
e214fa3de9 Merge "vndk-def: Move test_elfdump.py data into testdata." 2017-03-08 01:42:31 +00:00
Logan Chien
4888522fa0 vndk-def: Implement latest VNDK heuristics.
Test: ./tests/run.py

Change-Id: Ib52d215fde16e2a09dce27a5cc1d98834259d7f2
2017-03-07 20:34:28 +08:00
Logan Chien
d240feeaa3 vndk-def: Remove dump_exported_symbols().
This commit removes dump_exported_symbols() and replace the usages with
dump().

Test: ./tests/run.py
Change-Id: Ifed15e606e470c25a3c0a9090b60889e9cb4cb28
2017-03-07 13:00:39 +08:00
Logan Chien
a43f141da1 vndk-def: Add parse from ELF dump file.
Test: ./tests/test_elf.py
Change-Id: Icff8aeeb395c201261ed53f421d714edb28dba5d
2017-03-07 13:00:39 +08:00
Logan Chien
d2fcbb48bc vndk-def: Warn on bad user-specified dependencies.
Test: ./tests/run.py
Change-Id: I0365be01e92297c198164f62b3bbc2313b2acb89
2017-03-07 13:00:39 +08:00
Logan Chien
984bea8f00 vndk-def: Add GenericRefs.classify_lib().
This commit adds classify_lib() function which is a generalization of
is_equivalent_lib().  According to the input library argument, it will
run NEW_LIB, EXPORT_EQUAL, EXPORT_SUPER_SET, and MODIFIED.

Test: ./tests/test_generic_refs.py
Change-Id: I3073efe975be6e08ff67bb31d7fcb2eb8b556230
2017-03-07 13:00:38 +08:00
Logan Chien
e7764858a8 vndk-def: Split DT_NEEDED and dlopen() into two layers.
Test: ./tests/test_elf_link_data.py

Change-Id: I746b07a422ea53c38e3f05d259814edf120ded22
2017-03-07 13:00:38 +08:00
Logan Chien
2f7f4f4405 vndk-def: Link imported symbols.
This commit resolves the library dependencies down to symbol level.  It
will traverse all undefined symbols and try to find a matching symbol
from the libraries specified in DT_NEEDED entries.  This algorithm
won't be able to find symbols for the libraries that are not built with
-Wl,--no-undefined.  Unresolved weak symbols are added to
unresolved_symbols as well.

Test: ./tests/run.py

Change-Id: I3b0f06e38f256025bb6993d5c9f3d8afc3a4bf0e
2017-03-07 13:00:38 +08:00
Logan Chien
18e0749a9c vndk-def: Add vndk-stable finder.
Test: ./tests/run.py

Change-Id: I4ca800338d52e892bcc4a9556c02b567d4fd9a60
2017-03-07 13:00:38 +08:00
Logan Chien
d01e8f4984 vndk-def: Extract sp-hal finder.
Test: ./tests/run.py

Change-Id: I3bc23fd4e255d4c7b5211ff453cbe73d0978d988
2017-03-07 13:00:38 +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
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
Paul Duffin
f2d90cc8d8 Merge "Prepare for removal of junit and android.test classes from Android API (step 1)" 2017-03-03 09:56:02 +00:00
Paul Duffin
3a87d4fea4 Prepare for removal of junit and android.test classes from Android API (step 1)
In preparation for removing junit and android.test classes from
the Android API this change adds explicit dependencies on junit
and/or legacy-android-test to ensure that modules will compile
properly once it is removed.

Care was taken to ensure that any targets that depended,
directly or indirectly, on android-support-test did not also
depend on junit or hamcrest as they conflict with the versions
embedded within android-support-test.

Bug: 30188076
Test: make checkbuild
Change-Id: I03f7836a1081acda5ed2c6e43cb24e9dc23b944c
2017-03-01 13:21:09 +00: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
Fredrik Roubert
3e55022b86 Renaming Czech Republic to Czechia.
Bug: 34964100
Test: n/a
Change-Id: I711723923cefa88c99585518b085a2c8df076b7d
2017-02-23 17:30:02 +01: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