Commit Graph

33169 Commits

Author SHA1 Message Date
Hsin-Yi Chen
9ea932b958 Merge "Fix the unit test for header-abi-dumper -print-resource-dir" 2022-11-18 01:57:13 +00:00
Hsin-Yi Chen
315d047b46 Fix the unit test for header-abi-dumper -print-resource-dir
The resource dir has been changed from lib64 to lib since clang-r468909.
build-prebuilts.sh creates lib in the dist dir so that developers can
easily run the binaries.

Test: development/vndk/tools/header-checker/android/build-prebuilts.sh
Test: development/vndk/tools/header-checker/tests/test.py
Bug: 255702405
Change-Id: I9bed6f0fd7948830a89d9e24889d9341ebf1a9c4
2022-11-17 02:32:06 +00:00
Treehugger Robot
e1d600b62c Merge "Filter global variables and functions by -ignore-linker-set-key" 2022-11-16 09:05:43 +00:00
Hsin-Yi Chen
f5b6ebad09 Filter global variables and functions by -ignore-linker-set-key
Test: ./test.py HeaderCheckerTest.test_libgolden_cpp_return_type_diff
Bug: 259148872
Change-Id: I81f672d650a93eee69107ade07fc660a64c38e45
2022-11-16 15:43:22 +08:00
Treehugger Robot
aa16c32035 Merge "Allow extending vtables" 2022-11-10 11:27:54 +00:00
Christopher Ferris
1fdef9f560 Merge "Only add files in GlobSymbolsDir." 2022-11-09 20:57:51 +00:00
Christopher Ferris
e6e02b0e22 Only add files in GlobSymbolsDir.
I previously skipped directories, but that can still lead to problems.
So instead, only add paths that are files.

Test: Ran over a stack that failed when trying to run llvm-readelf
Test: on a directory. After this fix, everything get line numbers.
Change-Id: Ide39c5a118d78a822057cc3977d0f532595f798b
2022-11-08 17:47:37 -08:00
Treehugger Robot
e15b77f040 Merge "Revert "Remove renderscript related samples"" 2022-11-08 21:51:45 +00:00
Paul Lawrence
9b3ab88730 Revert "Remove renderscript related samples"
This reverts commit 7c7f0903b6.

Reason for revert: aosp-master sdk build is broken by this change
Bug: 258238947
Test: ACA has successfully verified the above culprit
Change-Id: I6a6ea4778f72e09780a04e062ec3b664aee2001f
2022-11-08 20:43:51 +00:00
Elliott Hughes
d946117723 Merge "Remove renderscript related samples" 2022-11-08 18:16:58 +00:00
Mao Han
7c7f0903b6 Remove renderscript related samples
Change-Id: Ieda294eae9febe304c3d15bd0207c3d3aad71c3c
2022-11-08 00:21:56 +00:00
Hsin-Yi Chen
393ba54671 Allow extending vtables
This commit adds VTableLayoutDiffIR::IsExtended() that determines
whether the difference is a pure extension, i.e., appending virtual
functions to vtables.

Test: ./test.py
Bug: 248418092
Change-Id: I339713c5fff1dfa50dc7875272c0e3a59f858f57
2022-11-07 14:51:13 +08:00
Treehugger Robot
99a9d7be5e Merge "Update deps for rmtypedefs and mkstubs." 2022-11-05 03:42:44 +00:00
Krzysztof Kosiński
02fd031e00 Update deps for rmtypedefs and mkstubs.
Use Guava built from source and a newer version of asm.

Test: mm
Bug: 244341573
Change-Id: Ic061b6a9b801f1378fafb23e493f1d29c46b06fe
2022-11-04 19:25:41 +00:00
Christopher Ferris
9d99dc95aa Merge "Fix build id check for libraries." 2022-11-03 18:38:14 +00:00
Elliott Hughes
14f9cec041 Merge "Remove renderscript samples." 2022-11-03 15:32:26 +00:00
Christopher Ferris
29fcc84e82 Fix build id check for libraries.
The current build id check uses the file utility. Unfortunately, it
doesn't work on all systems. Replace with a call to llvm-readelf and
get the bitness and build id using that data.

Other small modifications:
- Only attempt to get the full path for a library once for each library.
- Do not add directories into the symbol libraries.

Test: Unit tests pass.
Test: Running using a libart.so that file doesn't understand and
Test: verifying the line numbers are correct.
Change-Id: I12c3d3c4599d201c3c01feeb48448fee6c633d71
2022-11-02 17:55:57 -07:00
Elliott Hughes
cbb1cbc777 Remove renderscript samples.
Renderscript is deprecated and scheduled for removal. Let's start by
removing the easiest part to remove.

Test: treehugger
Change-Id: I5f172497756c3931ccfda742e9c08bde56b362c9
2022-11-02 16:56:36 +00:00
Treehugger Robot
e6b57e4a05 Merge "Add logcat APIs." 2022-10-24 17:19:27 +00:00
Treehugger Robot
7487a0a121 Merge "Add the instructions to resolve ABI difference" 2022-10-24 09:25:25 +00:00
Hsin-Yi Chen
3776a20379 Add the instructions to resolve ABI difference
The instructions are organized into a section. The developers who need
to resolve ABI difference can easily find it.

Test: None
Bug: 244520027
Change-Id: I211de0e1f65eece093fe716122753ea795c43b3e
2022-10-24 16:41:14 +08:00
Dan Albert
034e7e2827 Add logcat APIs.
Bug: None
Test: Using this in the NDK
Change-Id: I8becab8a0697f2378f1ce472091be497ba13c848
2022-10-20 17:03:10 -07:00
Treehugger Robot
a063ff34e4 Merge "Use gdb-remote without host if not given" 2022-10-19 18:38:57 +00:00
Florian Mayer
b61f795aa4 Use gdb-remote without host if not given
Test: lldbclient.py -r ls
Change-Id: I162d318fa30c44f180b6104b31e61e7521fb6a48
2022-10-19 01:16:11 +00:00
Treehugger Robot
002769b04c Merge "Remove scripts that haven't yet been updated for python3." 2022-10-18 23:10:29 +00:00
Elliott Hughes
f8b9b91130 Remove scripts that haven't yet been updated for python3.
That seems like a sign none of these are used. (Two of them haven't been
touched since their initial import in 2009!)

Test: treehugger
Change-Id: I76042f6c8fab84669c83aa72cd0b5df13f01ed7c
2022-10-18 21:41:59 +00:00
Treehugger Robot
c3f6fcabf1 Merge "[clang-tools] Symlink lib -> lib64 in prebuilts/clang-tools" 2022-10-18 18:48:28 +00:00
Pirama Arumuga Nainar
59eac68f50 [clang-tools] Symlink lib -> lib64 in prebuilts/clang-tools
Bug: http://b/241011085

Create symlink lib -> lib64 as toolchain libraries have a RUNPATH pointing
to $ORIGIN/../lib instead of lib64

Test: presubmit with new clang-tools prebuilts
Change-Id: I90973fc756b9489a16a0837473b86e728f50d8e0
2022-10-18 16:39:07 +00:00
Chih-hung Hsieh
2a2efc7cf0 Merge "Update clang-tools build to clang-r468909" 2022-10-18 04:02:14 +00:00
Chih-Hung Hsieh
21b04bc844 Update clang-tools build to clang-r468909
Bug: 241011085
Test: presubmit
Change-Id: I969239931c07dd97ce0259a3766ae93d68b21927
2022-10-17 23:45:22 +00:00
Treehugger Robot
eb8582344b Merge "Fix errorprone warnings that should be errors" 2022-10-17 16:03:16 +00:00
Cole Faust
a54b856e8d Fix errorprone warnings that should be errors
This commit is part of a large scale change to fix errorprone
errors that have been downgraded to warnings in the android
source tree, so that they can be promoted to errors again.
The full list of changes include the following, but not all
will be present in any one individual commit:

BadAnnotationImplementation
BadShiftAmount
BanJNDI
BoxedPrimitiveEquality
ComparableType
ComplexBooleanConstant
CollectionToArraySafeParameter
ConditionalExpressionNumericPromotion
DangerousLiteralNull
DoubleBraceInitialization
DurationFrom
DurationTemporalUnit
EmptyTopLevelDeclaration
EqualsNull
EqualsReference
FormatString
FromTemporalAccessor
GetClassOnAnnotation
GetClassOnClass
HashtableContains
IdentityBinaryExpression
IdentityHashMapBoxing
InstantTemporalUnit
InvalidTimeZoneID
InvalidZoneId
IsInstanceIncompatibleType
JUnitParameterMethodNotFound
LockOnBoxedPrimitive
MathRoundIntLong
MislabeledAndroidString
MisusedDayOfYear
MissingSuperCall
MisusedWeekYear
ModifyingCollectionWithItself
NoCanIgnoreReturnValueOnClasses
NonRuntimeAnnotation
NullableOnContainingClass
NullTernary
OverridesJavaxInjectableMethod
ParcelableCreator
PeriodFrom
PreconditionsInvalidPlaceholder
ProtoBuilderReturnValueIgnored
ProtoFieldNullComparison
RandomModInteger
RectIntersectReturnValueIgnored
ReturnValueIgnored
SelfAssignment
SelfComparison
SelfEquals
SizeGreaterThanOrEqualsZero
StringBuilderInitWithChar
TreeToString
TryFailThrowable
UnnecessaryCheckNotNull
UnusedCollectionModifiedInPlace
XorPower

See https://errorprone.info/bugpatterns for more
information on the checks.

Bug: 253827323
Test: m RUN_ERROR_PRONE=true javac-check
Change-Id: Ic7e78cc74523ee09c1b4aa9969756f0cfd609e08
2022-10-15 21:33:28 -07:00
Christopher Ferris
7fa99882d8 Merge "Remove obsolete script." 2022-10-14 19:03:38 +00:00
Treehugger Robot
1d2edd2cd2 Merge "Fix the comparison of opaque types that have multiple definitions" 2022-10-14 09:33:04 +00:00
Hsin-Yi Chen
959646a857 Fix the comparison of opaque types that have multiple definitions
The types defined in more than one source file are identified with
"#ODR:" and the source paths. The paths can be in intermediate
directories and differ between build targets. They cause ABI check
failure on opaque types. This commit fixes the bug by removing the
suffixes before the comparison.

Test: make libcamera2ndk
Bug: 253095767
Change-Id: I79e6e843460c981afcf2ce0e0d2ad9335d0b3e90
2022-10-14 14:33:00 +08:00
Christopher Ferris
99d580a123 Remove obsolete script.
In addition, remove the test for it and the test file.

Test: NA
Change-Id: Ib5124749c523177805f494d9a6daf2400b6fc84c
2022-10-13 16:38:34 -07:00
Cole Faust
0bd20974dd Merge "Dist the module-lib and system-server lint databases" 2022-10-12 22:49:06 +00:00
Treehugger Robot
9a0d8d75f0 Merge "Add riscv binary recognition in gdb script" 2022-10-12 18:04:03 +00:00
Xia Lifang
8d2ff19bc3 Add riscv binary recognition in gdb script
Signed-off-by: Xia Lifang <lifang_xia@linux.alibaba.com>
Signed-off-by: Mao Han <han_mao@linux.alibaba.com>
Change-Id: I61793c3c1e32828ac4196a20f85b4fe2832c4992
2022-10-12 19:36:09 +08:00
Inseob Kim
d9150d3841 Merge "gdbrunner: Make sure remote lldb-server has +x" 2022-10-12 01:53:25 +00:00
Inseob Kim
7b29d05387 gdbrunner: Make sure remote lldb-server has +x
Because 'adb push' often misses the executable permission, lldbserver
can fail without any meaningful error messages. This may happen when the
users are on Windows. To fix that, explicitly chmod remote lldbserver
after push.

Bug: 185210505
Test: manual
Change-Id: I88defd4905a9b902424ae8ef4b38a16932b31f02
2022-10-12 09:40:14 +09:00
Treehugger Robot
1caa406e30 Merge "Fix the comparison between opaque parameters" 2022-10-07 02:07:49 +00:00
Cole Faust
d01c3b26d1 Dist the module-lib and system-server lint databases
So that they can be downloaded to prebuilts/sdk.

Bug: 193460475
Test: m sdk dist
Change-Id: I0018256221c994b1b7070bab13a45e5067df1c2a
2022-10-06 13:40:11 -07:00
Hsin-Yi Chen
5cc255dee6 Fix the comparison between opaque parameters
Function parameters can be opaque and have no size information. For
example, __va_list in AArch64 ABI. header-abi-diff considers opaque
types compatible if their mangled names are the same.

The mangled name of __va_list can be _ZTI9__va_list or _ZTISt9__va_list.
They are also compatible.

Test: ./test.py
Bug: 248418092
Change-Id: I812abcabb620301eb575c54c7e3d2ff63dade488
2022-10-06 15:46:16 +08:00
Inseob Kim
f6e13d426b Merge "Add overrides support for snapshots" 2022-10-05 23:43:00 +00:00
Hsin-Yi Chen
acccadc399 Merge "Simplify the error message for ABI check" 2022-10-05 05:13:20 +00:00
Hsin-Yi Chen
f5f04a5b6c Simplify the error message for ABI check
- Remove "VNDK" from the message.
- Deprecate -elf-unreferenced-symbol-errors.
- Fix the status string for CompatibilityStatusIR::UnreferencedChanges.

Test: ./test.py
Bug: 249324120
Change-Id: I5a1fd64f9101caa29d87d9f65bd4d17b8bd77059
2022-10-05 10:13:41 +08:00
Hsin-Yi Chen
fc212f2a34 Merge "Do not allow extending pass-by-value parameters or return types" 2022-10-05 02:03:26 +00:00
Inseob Kim
1c56623fac Add overrides support for snapshots
Overrides properties will now be captured in json flag files, which will
be copied to installed vendor snapshot modules.

Bug: 216567575
Test: soong test && manual install
Change-Id: I921a19b978b17812e830d15df562d217e4e51f73
2022-10-04 14:45:06 +09:00
Treehugger Robot
f8a1fc304c Merge "idegen: Migrate try-finally to try-with-resources for Configuration.java" 2022-10-03 04:50:00 +00:00