Commit Graph

884 Commits

Author SHA1 Message Date
Treehugger Robot
1dc3d3be29 Merge changes Ic2fd4056,I198fb9b7,I0d61ea11,I59d9b8f7
* changes:
  Retry the command for querying parent artifacts
  Revise comments for when -v, -m options are needed
  Check first if system_dir and device_dir exists
  Print error on missing device target_files archive
2018-08-16 00:43:43 +00:00
Logan Chien
add620d230 Remove full paths from abi_diff.proto
This commit removes the full import path from abi_diff.proto so that
header-abi-dumper can be built separately.

Test: ./tests/test.py
Change-Id: Iec5062dc7ddecfec0f2fdac5993513fd647475ae
2018-08-14 18:26:34 +08:00
Jae Shin
cfc7c1ba90 Retry the command for querying parent artifacts
Currently mixed build targets are flaky, intermittently breaking
with the error message that either the parent artifact directory
does not exist (system_dir, device_dir) or a specific artifact
in the parent artifact directory does not exist.
To help debug this flakiness issue and avoid any race conditions
within the build-chaining infrastructure, allow the retrying of
the command for querying parent artifacts.

Test: build_mixed system_dir device_dir out_dir
Bug: 112250435
Change-Id: Ic2fd4056163c2a32d6057b6c182061c605cd158d
2018-08-14 18:22:57 +09:00
Jae Shin
d5fd24f609 Revise comments for when -v, -m options are needed
Test: build_mixed
Change-Id: I198fb9b7d9916ee7bb3ab5e005a3de1e4d1dd866
2018-08-14 15:14:17 +09:00
Jae Shin
f418b9b9e5 Check first if system_dir and device_dir exists
Change the order of variable checking so it is clear whether
the system_dir or device_dir does not exist or a specific file
in the *_dir does not exist.

Test: build_mixed system_dir device_dir dist_dir
Merged-In: I0d61ea11c3bd22ef12eccbb46b8f665414188307
Change-Id: I0d61ea11c3bd22ef12eccbb46b8f665414188307
(cherry picked from commit 52edf8fb4f)
2018-08-14 15:13:39 +09:00
Paul Trautrim
d2d8ac9509 Print error on missing device target_files archive
Check the newly-created DEVICE_TARGET_FILES_ARCHIVE variable instead of
checking the DEVICE_ARCHIVE variable twice.

Test: run build_mixed with only the *-img-* archive in the device directory
Merged-In: I59d9b8f77cac1dcdeb2c88cdf37bc8dfbd1111ca
Change-Id: I59d9b8f77cac1dcdeb2c88cdf37bc8dfbd1111ca
(cherry picked from commit c1474312b3)
2018-08-14 15:13:00 +09:00
Logan Chien
88368b1306 Merge changes Id2c62a6a,I20b288ea
* changes:
  Fix function pointer test for header-checker.
  header-checker: Cleanup Android.bp
2018-08-14 05:47:47 +00:00
Jayant Chowdhary
728a91471e Fix function pointer test for header-checker.
Test: changing tests/integration/cpp/include/abstract_class.h changes to
      test results. This would not happen earlier, since inadvertently,
      the test used to pick up abi references locally instead of freshly
      creating them.

Change-Id: Id2c62a6a69b151c5c7f504cfd94bc2be8c851c31
2018-08-14 12:21:53 +08:00
Logan Chien
fa90c59d69 header-checker: Cleanup Android.bp
This commit removes wildcards from the `srcs` properties and removes
unnecessary static libraries.

Test: It builds
Change-Id: I20b288eacf571b367195c809ff23dbbe2c1dd32c
2018-08-14 11:44:07 +08:00
Jae Shin
124ef784fa Remove ld.config.txt from prebuilts build rule
Starting from the P VNDK snapshot, the linker config file will be
built and installed from the source tree at the time the VNDK
snapshot is installed to the system.img (of Q+), rather than
installing the prebuilt from /prebuilts/vndk/v{VER}. The installed
linker config file is used for both system and vendor processes,
thus should be built from the most up-to-date ld.config.txt
template in the source tree of the system partition.

Test: python gen_buildfiles.py 28 -vv
Test: m -j vndk_v28_arm64; check /system/etc/ld.config.28.txt
Bug: 74658756
Merged-In: I86034e6bbbab6a096814389332c26920ef7d40fc
Change-Id: I86034e6bbbab6a096814389332c26920ef7d40fc
(cherry picked from commit e020f7131e)
2018-08-10 12:04:22 +09:00
Xin Li
f0edd38359 Merge "Merge Android Pie into master" 2018-08-07 16:51:28 +00:00
Treehugger Robot
752ffe8a3b Merge "Remove "is_inlined" from header-abi-dumper" 2018-08-07 05:01:38 +00:00
Yi-yo Chiang
c79ffcedda Remove "is_inlined" from header-abi-dumper
This commit removes "is_inlined" flag from lsdump's VTableComponent,
because the clang library used to walk the ast doesn't report accurate
information about whether a member function is inlined or not.

Also update the testcases.

Bug: 80217511
Test: ./tests/test.py
Change-Id: I0e133b140a4f3debff8030de7d6712590cf98d76
2018-08-03 14:36:35 +08:00
Yi-yo Chiang
9b82bd1bcf Merge "Print undemanglable symbols in vndk-vtable-dumper"
am: fddbb8c61a

Change-Id: I15795e907a98d511fb0d3cbeccd73f34dd9e1f26
2018-08-02 23:26:27 -07:00
Treehugger Robot
fddbb8c61a Merge "Print undemanglable symbols in vndk-vtable-dumper" 2018-08-03 06:18:55 +00:00
Yi-yo Chiang
adfe53f551 Print undemanglable symbols in vndk-vtable-dumper
Instead of skipping the vtable entry, vndk-vtable-dumper now prints
undemanglable vtable entries.
Vtables should always contain C++ symbols (mangled symbols). The only
exceptions are when vtables contain pure virtual or deleted
virtual functions. In that case the vtable may contain C symbols
(unmangled symbols) of __cxa_pure_virtual or __cxa_deleted_virtual.
In that case we just print the undemanglable C symbol as its mangled and
demangled name, though technically its not mangled.

Bug: 111968285
Test: m vndk-vtable-dumper
Test: vndk-vtable-dumper android.frameworks.displayservice@1.0.so
Test: vndk-vtable-dumper android.frameworks.displayservice@1.0.so -mangled
Change-Id: I4d1c99ba23a327fd5709233a38d309180c9cfd43
2018-08-03 06:04:50 +00:00
Yi-yo Chiang
36e8d459d3 Merge "Check machine arch before detecting relocation type"
am: 36efe44516

Change-Id: Ibca32ca680dc5b5e5ccd61c3a0bb974321f02510
2018-08-02 19:02:55 -07:00
Yi-yo Chiang
0a93212704 Check machine arch before detecting relocation type
This commit makes vndk-vtable-dumper to check ELF file machine arch
(x86/x86_64/arm/arm64) when detecting relocation type, as relocation
type constants such as R_ARM_ABS32, R_386_32 are not gauranteed to be
unique across different machines.

Test: m vndk-vtable-dumper
Test: vndk-vtable-dumper libziparchive.so # with x86/x86_64/arm/arm64 arch
Change-Id: I58d6d7bff7b7eb16e96cbe02f4989e45a17fd295
2018-08-02 17:51:36 +08:00
Yi-yo Chiang
0946ce23fd Merge "create_reference_dumps.py: Change lsdump_paths.txt to newline-separated paths"
am: 77b844cb98

Change-Id: Ie1ac2158c9857df35a139599728d90147937ceae
2018-07-31 23:12:09 -07:00
Treehugger Robot
77b844cb98 Merge "create_reference_dumps.py: Change lsdump_paths.txt to newline-separated paths" 2018-08-01 06:02:30 +00:00
Yi-yo Chiang
a0a9f59847 Merge "Add abi_dump_pb2.py to vndk/tools/header-checker/proto"
am: a56dfaf4de

Change-Id: Ibb9a9283b591c047a630f9b7dca402d0edd95061
2018-07-31 00:32:39 -07:00
Yi-yo Chiang
666a09c379 Add abi_dump_pb2.py to vndk/tools/header-checker/proto
Add the compiled python proto module so that vts tests can process lsdump.

Test: python -c 'import abi_dump_pb2'
Change-Id: I8beb6e5de8c55e2dc5bb5ecff1364892bb8c58d8
2018-07-30 09:57:24 +00:00
Yi-yo Chiang
5c8b92b3c3 create_reference_dumps.py: Change lsdump_paths.txt to newline-separated paths
Split the content of lsdump_paths.txt with newline.

Bug: 111814844
Test: m vndk findlsdumps -j18
Test: ./utils/create_reference_dumps.py -products aosp_arm64
Change-Id: I76ed008382fff8589d29ab97720d262a7636d523
2018-07-26 10:24:29 +08:00
Yi-yo Chiang
088bdf1af4 Merge "Add is_inlined and is_pure property to header-abi-dump"
am: 54e9654768

Change-Id: I197b7da5c6dfb5d743a8a16565654846176a13d2
2018-07-23 19:04:04 -07:00
Yi-yo Chiang
0218a940cb Add is_inlined and is_pure property to header-abi-dump
- abi_dump.proto: Adds is_inlined and is_pure flag to VTableComponent.
is_inlined means a virtual function is inlined and probably not exported.
is_pure means a virtual function is pure and probably not exported.

Bug: 80217511
Test: ./tests/test.py
Change-Id: Ic1562ed47faba1f3d7eec6dffe94991296ba7176
2018-07-23 14:58:03 +08:00
Logan Chien
5e1ab1043a Merge "Add vndk-lib-extra-list-current.txt"
am: 6a226c1aca

Change-Id: I613670f3dc1ac193374ad703245c5b76deff44d6
2018-07-13 09:13:32 -07:00
Logan Chien
55a421eaeb Add vndk-lib-extra-list-current.txt
This commit adds `vndk-lib-extra-list-current.txt`.  This file contains
the LLNDK/VNDK/SP-HAL shared libraries (and dependencies) that cannot be
specified in Android.bp.

Bug: 80521281
Test: make vts
Change-Id: If7b414589786dab424a21773bfd33f10b415d899
Merged-In: If7b414589786dab424a21773bfd33f10b415d899
(cherry picked from commit 7e177685d8)
2018-07-13 16:44:18 +08:00
Logan Chien
5c9f06ae45 Merge changes I5199a7e9,I386ab7c1,I2038c77c
am: 524fc465ec

Change-Id: Ic7acf2fc2c83eb92129a1d74d8fff1a61683acd9
2018-07-12 08:09:50 -07:00
Logan Chien
bec07164e5 sourcedr: Add more project analysis filters
This commit adds `--has-group`, `--only-has-group`, and
`--without-group` to filter projects.

Test: analyze_manifest_split.py -b Android.bp -m .repo/manifest.xml \
  --has-group=system_only
Test: analyze_manifest_split.py -b Android.bp -m .repo/manifest.xml \
  --only-has-group=vendor_only
Test: analyze_manifest_split.py -b Android.bp -m .repo/manifest.xml \
  --without-group=both

Change-Id: I5199a7e940538e73a1af19cfd78afbe4427d6e3b
2018-07-12 20:29:23 +08:00
Logan Chien
7e9606dc3e sourcedr: Check whether paths map to projects
This commit checks whether the path maps to a git project specified in
`manifest.xml`.  If it does not map to a git project, emit an error and
skip it.  If we don't do so, an exception will be raised because the
`sorted()` function cannot compare `None` object with `str` object.

Test: Add a project to external and it does not stop the analyzer.
Change-Id: I386ab7c1f76d5630a2c5f43186f38a791a3bb7b9
2018-07-12 19:32:23 +08:00
Logan Chien
83fec1025c vtable-dumper: Update test script
Test: tests/test_vndk_vtable_dumper.py
Change-Id: I2038c77c930ab9b0d70b54d7e73c1a88a0c7f725
2018-07-12 19:25:00 +08:00
Logan Chien
f4d6ea8842 Merge "vtable-dumper: Add loganchien to OWNERS"
am: 532d1aa70f

Change-Id: I73510d7c2d519dab5f504251854888ef28ca2a00
2018-07-06 03:41:24 -07:00
Yi-yo Chiang
7268e66d3a Merge "Fix vtable boundary check in vndk-vtable-dumper"
am: 3369b670ac

Change-Id: I85b0c51f4d68bc5fa4644ae00a8ef3d1ac5aa1cb
2018-07-06 03:40:57 -07:00
Treehugger Robot
532d1aa70f Merge "vtable-dumper: Add loganchien to OWNERS" 2018-07-06 10:38:18 +00:00
Logan Chien
502af5c406 vtable-dumper: Add loganchien to OWNERS
Test: n/a
Change-Id: I40d89fa90fdd1bf1be0b02ba7986ebdac98847ef
2018-07-06 16:08:40 +08:00
Yi-yo Chiang
a203b62ab9 Fix vtable boundary check in vndk-vtable-dumper
Add check for vtable boundary in identifyVTable().
Fix check for section boundary in identifyAddend().

Test: vndk-vtable-dumper libtest1.so -mangled
Bug: 111146760
Change-Id: If1369760823323f3bc5094121a5ce510714f8a93
2018-07-05 17:37:13 +08:00
Hsin-Yi Chen
cda676761a Merge "Show thunk symbols in vtables"
am: 321b110998

Change-Id: I101bd3c34f04f56c69aecf4ce4828ecaa713cadf
2018-07-01 21:09:21 -07:00
Hsin-Yi Chen
321b110998 Merge "Show thunk symbols in vtables" 2018-07-02 02:11:04 +00:00
Hsin-Yi Chen
cd1eada7b0 Show thunk symbols in vtables
- Convert method declarations to thunk symbols if thunk information
  exists.
- Add a test case and reference dumps for virtual inheritance.

Bug: 80671888
Test: ./tests/test.py
Change-Id: I55ecbd7c8b0f5b0f534d81e6c6967f99ffd1d42e
2018-06-29 10:57:31 +00:00
Logan Chien
3da4df881f Merge "header-checkers: Add loganchien to OWNERS"
am: c79e4a961b

Change-Id: I6f035b4d971520bcbf50914c696289c1a58e18fe
2018-06-28 22:13:15 -07:00
Logan Chien
d014da7490 header-checkers: Add loganchien to OWNERS
Test: n/a
Change-Id: I2fde4fc8927fcfd6ddceadc9e6f75d3d9fabfe66
2018-06-29 10:47:24 +08:00
Jae Shin
62d0ddb819 Merge changes I283fe25a,Iabef0b10
am: 50fb8c3029

Change-Id: Idf526011475c5bae9790d3c54d0bb79127f6428b
2018-06-25 23:33:26 -07:00
Jae Shin
af0c00328a Support new binder32bit property
Starting in VNDK snapshot v28 (P), prebuilts built for 32-bit
binder interface are isolated in separate 'binder32' subdirectory
under prebuilts/vndk/v{VER}/{ARCH}/. All other prebuilts are
assumed to use 64-bit binder interface.

To differentiate prebuilts per binder bitness, the following
changes are made:
1) a new 'binder32bit' property added to the Android.bp files
autogenerated for the vndk_prebuilt_shared soong module
2) new phony modules, vndk_v{ver}_{arch}_binder32, defined for
32-bit binder prebuilts,
3) 'binder32' suffix added to the prebuilt versioned name,
e.g. libfoo.vndk.{ver}.{arch}.binder32.vendor

Test: python gen_buildfiles.py 28 -vv
Test: python gen_buildfiles.py 27 -vv
Bug: 78279738
Change-Id: I283fe25a34d3381d13097ede34c428c83dffe11e
2018-06-25 17:58:35 +09:00
Jae Shin
bd82ebbe49 Expand a leading '~' to $HOME in arg for --local
Test: python update.py --local=~/some/local/path
Bug: 78279738
Change-Id: Iabef0b10ff9ad7a5008f63a1b558351a240b4227
2018-06-25 17:45:34 +09:00
Logan Chien
d1a8b72479 Merge changes I5f3b98aa,I6077d014,I276dbb46
am: 92a4974663

Change-Id: I087d3ffceda3b274c2e2d49a592a2ef8df09b2b0
2018-06-21 19:24:49 -07:00
Logan Chien
fbf5361845 Merge "vndk-def: Fix check-dep --check-apk in Python 2"
am: b9a95fc5b4

Change-Id: I9291bd57f5f68070740bd87816e0543c53479491
2018-06-21 19:23:22 -07:00
Logan Chien
92a4974663 Merge changes I5f3b98aa,I6077d014,I276dbb46
* changes:
  sourcedr: Remove incomplete sourcedr
  sourcedr: Add missing __init__.py
  sourcedr: Move sub-projects to parent directory
2018-06-22 02:12:17 +00:00
Logan Chien
8ab92e5685 sourcedr: Remove incomplete sourcedr
This commit removes the incomplete source dependency review tool.

Test: n/a
Change-Id: I5f3b98aace3198262f35b45db552d64828533707
2018-06-21 16:52:21 +08:00
Logan Chien
8f6fbbc467 sourcedr: Add missing __init__.py
This commit adds a missing `__init__.py` to `ninja/tests`, so that
unit test discovery can find unit tests without any arguments.

Test: sourcedr/ninja/tests/run_tests.sh
Change-Id: I6077d014f33ccb176bf2138e3a0035c871c8eead
2018-06-21 16:40:05 +08:00
Logan Chien
e0a1300b46 sourcedr: Move sub-projects to parent directory
Test: sourcedr/blueprint/tests/run_tests.sh
Test: sourcedr/ninja/tests/run_tests.sh tests
Test: definition-tool/tools/update_dataset_auto.py
Change-Id: I276dbb46115622f4f562d2ff176433c56f8d945b
2018-06-21 16:39:52 +08:00