This reverts commit 1db4348734.
Changes from original:
- extracted function to add the current version to stub
versions for bp2build.
- added libc++ to mixed builds denylist
Reason for revert: re-uploading with fix in topic
Bug: 270408757
(cherry picked from https://android-review.googlesource.com/q/commit:75dbca2eae78bb280b50828d3c2165bda5d87ba5)
Merged-In: Ifa0ed456bf8cb4a7f861d6826263adfedb4fdd9c
Change-Id: Ifa0ed456bf8cb4a7f861d6826263adfedb4fdd9c
SortedUniqueStrings and FirstUniqueStrings dedupes repeating elements
and returns the deduped list. Currently, it also modifies the input list
in-place, which causes non-determinisitc failures like b/275313114
Operate on a copy of the input so that the input remains untouched.
SortedUniqueStrings is O(NlogN) and FirstUniqueStrings is ~O(N), so
creating a copy (O(N)) should not result in major performance regressions.
Numbers for this single unit test:
```
go test . -run TestStubsForLibraryInMultipleApexes -v -count 1000
Before: 174s
After: 172s
```
Bug: 275313114
Test: go test ./android
Test: go test . -run TestStubsForLibraryInMultipleApexes -v -count 1000
(cherry picked from https://android-review.googlesource.com/q/commit:8a8714c781175f8f1a6c189d919ee8b0ee8c1e27)
Merged-In: Id859723b2c2ebdc0023876c4b6fabe75d870bad7
Change-Id: Id859723b2c2ebdc0023876c4b6fabe75d870bad7
Previously, CopyOf on an empty list was returning nil. With the updates
to SortedUniqueStrings and FirstUniqueStrings, we need to differentiate
between empty lists and nil.
Bug: 275313114
Test: m nothing
(cherry picked from https://android-review.googlesource.com/q/commit:cc4da765113299fa11dcb1e651ec4ae33e6f8f9b)
Merged-In: I91063ebbe5013cbda5d8f70efde4683c66581599
Change-Id: I91063ebbe5013cbda5d8f70efde4683c66581599
1) Use attribute name "default_package_metadata" instead of
"default_applicable_licenses" in packages to better describe its use.
2) Add a filegroup "default_metadata_file" in packages to search for
METADATA file in each package.
3) Include "default_metadata_file" in each package's
"default_package_metadata" attribute.
Bug: 275472038
Test: CIs
(cherry picked from https://android-review.googlesource.com/q/commit:2c9e8d612819840020b2d110d23fb2771b6c92f0)
Merged-In: I645c013c39e3190fd96c4a549d39a331aced16bd
Change-Id: I645c013c39e3190fd96c4a549d39a331aced16bd
clang-r487747c contains upstream fix for the excessive stack protactor
checks (fc4494dffa54) and checks are no longer inserted for C only code
or C++ code built without exeception. The Android platform does not
enable C++ exception by default, thus turning on the check should not
have significant performance impact.
This reverts commit ecc18df6ff.
Test: presubmit
Bug: 277565884
Bug: 279955553
(cherry picked from https://android-review.googlesource.com/q/commit:e9850f81531f070ac5cd193fdcd767bc91605bfe)
Merged-In: I2fc5826048ba5d00cabcc8401ac40a6f54812a44
Change-Id: I2fc5826048ba5d00cabcc8401ac40a6f54812a44
Getting the first certificate will panic if there are no certificates,
which can happen when AllowMissingDependencies is set and the
certificate property is a module reference to a missing module.
Only get the first certificate if the list is not nil.
Use mainCertificate since it handles the logic already.
Test: TestAppMissingCertificateAllowMissingDependencies
Bug: 283102635
Merged-In: : I8b27f65aa7d071041171ad45ac52bf47fa31bf2b
Change-Id: Icaaa45d48ca4edb876687c0813165d107d28ef8a
This fixes an incrementality bug that resulted in superfluous
build.ninja regeneration after a new glob definition is added.
(cherry picked from https://android-review.git.corp.google.com/c/platform/build/soong/+/2585669)
Fixes: 279674820
Test: Treehugger
Test; New integration test in this CL
Merged-In: Ifefe66a0eb1c125e9ad5373d60437a1cb1e6fdec
Change-Id: Ifefe66a0eb1c125e9ad5373d60437a1cb1e6fdec
prebuilt_etc may use sub_dir property to define a relative install
path. Use SubDir() to read either sub_dir or relative_install_path
property.
Bug: 282080219
Test: m vendor-image
Merged-In: I07a21c5aeb87b403854ed32976d26e70b046b8c1
Change-Id: I07a21c5aeb87b403854ed32976d26e70b046b8c1
(cherry picked from commit 8bd3afe68c)
After this change, there is a clear separation between tests that are
related to dexpreopt and tests that are not. The former uses
PrepareForTestWithDexpreopt, while the latter uses
PrepareForTestWithJavaDefaultModules. The benefit is that the latter
will no longer affected by any dexpreopt changes.
Bug: 280776428
Test: m nothing
(cherry picked from https://android-review.googlesource.com/q/commit:b95998be731406209f18fab764b96421a17ab4c9)
Merged-In: Ib957765b9287d51c082e0a33cee17a6bb56daeef
Change-Id: Ib957765b9287d51c082e0a33cee17a6bb56daeef
As-is, dexpreopt config and bootjar is in the dir including
DeviceName(). It causes unnecessary dexpreopt invocation when target is
changed repeatly. To avoid it, rename dir to common name.
Bug: 278833696
Test: m
(cherry picked from https://android-review.googlesource.com/q/commit:4753b39ccaaf573910e6b7a4200e9ca03ec8d96d)
Merged-In: I2818d9ae09e6c22ca6989cc8efdb70b470ec502c
Change-Id: I2818d9ae09e6c22ca6989cc8efdb70b470ec502c
Bug: 280440941
Test: -
1. Patch ag/22302622 to disable dexpreopt.
2. lunch aosp_cf_x86_64_phone-userdebug && m
3. See app profiles still generated.
Test: -
1. Patch ag/20592051 to enable profile for service-art.
2. banchan com.android.art x86_64 && m
3. See the profile for service-art generated.
(cherry picked from https://android-review.googlesource.com/q/commit:cf61e3c59133227894ac7d72091b48451a3e6761)
Merged-In: I6090b4b74cedb6d129fcbeef58d075c8ccdcc4e2
Change-Id: I4e721b475b84a2f667bbccc030a8947078f26bb0
Vendor snapshot libraries generated from prebuilt libraries set
"apex_inherit" to their min_sdk_version property to allow them to be
used by vendor APEXes.
Bug: 277403349
Test: m vendor-snapshot
Merged-In: Idd9e5f8e94b3fa2adf47a04507bf0c50c59edfb7
Change-Id: Idd9e5f8e94b3fa2adf47a04507bf0c50c59edfb7
(cherry picked from commit 3cc7846b58)
so that Vendor APEXes don't embed the LLNDK prebuilts (which are just
stubs of LLNDK libraries).
Bug: 280697209
Bug: 277403349
Test: m nothing (soong test)
Merged-In: I9e6c123e73fa0ab56d8494a01652ee32a9b6a6cd
Change-Id: I9e6c123e73fa0ab56d8494a01652ee32a9b6a6cd
(cherry picked from commit e3f0281b88)
Without respecting the relative install path, the snapshot install
path may collide when they use the same stem name.
To avoid this, respect the relative install path when generating the
snapshots.
Bug: 279652606
Test: RECOVERY_SNAPSHOT_VERSION=current m recovery-snapshot
Merged-In: Ic70a5855aeb2a6eda397b4dd06113dddb6ef70f4
Change-Id: Ic70a5855aeb2a6eda397b4dd06113dddb6ef70f4
(cherry picked from commit 17d0ee2160)
Environment variables HWASAN_INCLUDE_PATHS and
PRODUCT_HWASAN_INCLUDE_PATHS can be used to enable HWASan for multiple
modules, by just adding the module directory to the env variable.
Bug: b/271948407
Test: Set specific module directory to above env variable and check the
assembly codes of output elf files after building, finding hwasan
related symbols inside.
Merged-In: Ic49b515830c4469ca5fa94f547b26c0fb602fc54
Change-Id: Ic49b515830c4469ca5fa94f547b26c0fb602fc54
(cherry picked from commit a98aab98c4)
Currently, target_sdk_version of MTS tests were being set to 10000 even
in release branches. This should only happen in active branches.
Test: Unit test
Test: aapt2 on CtsContentTestCases in udc-dev and verified
targetSdkVersion is 34
Bug: 279507428
Change-Id: Ib79318febc0f6e771b3679c0281a97357930ec56
Merged-In: Ib79318febc0f6e771b3679c0281a97357930ec56
(cherry picked from commit fb6a1ee68b)
The default ELF segment alignment will be 4096. This alignment
can be overriden by setting the desired alignment in
PRODUCT_MAX_PAGE_SIZE_SUPPORTED flag. The alignment has to be
a multiple of the configured kernel page size.
Test: Built changes for Pixel 4a, 6 and checked alignment.
Bug: 276963698
Bug: 276801883
(cherry picked from https://android-review.googlesource.com/q/commit:05d4d901146d96634ad0ff3a9982c9c87c394f18)
Merged-In: Icb380041a5b27da1fa0d86b302e1e7cde9a236d7
Change-Id: Icb380041a5b27da1fa0d86b302e1e7cde9a236d7
libbpf_minimal can be included as a prebuilt vsdk library. This must
include the license_kinds of libbpf_minimal-license from soong.
Add the visibility for the prebuilts.
Bug: 271539873
Test: build against vsdk
Merged-In: Ib1c3e7705e7f234b2b54c2180642d6134c6131ea
Change-Id: Ib1c3e7705e7f234b2b54c2180642d6134c6131ea
(cherry picked from commit 3b23ac0025)
The udc-dev version is now lower than the prebuilts b/278817494.
Increasing it so it's higher than prebuilts but still low enough, b/231691162 suggested initially to use xx5990000 for x-dev.
I've checked tm-dev and the latest prebuilt was 3318, so 3459 prefix should be enough for udc-dev.
Change-Id: Idc85a121825aea754b258b306660ca71c6b1fdd9
BUG: 278817494
Ignore-AOSP-First: This change is needed in udc-dev only
In addition to the license text files, include license kinds
information to json file. Also, use the original paths of license
text files that are copied to NOTICE_FILES directory.
This will be used when generating snapshots from the snapshot build.
Bug: 271539873
Test: m vendor-snapshot
Merged-In: I0c0427bb66f2c1fca322d5554aa66220a3b62fb3
Change-Id: I0c0427bb66f2c1fca322d5554aa66220a3b62fb3
(cherry picked from commit 1db9748805)