Commit Graph

68521 Commits

Author SHA1 Message Date
Tongbo Liu
7e1a854d08 [RESTRICT AUTOMERGE] Enable build MCTS on aosp-android14
Bug: 345592291
Change-Id: I4b72c270d36a1fd2785494814b8a953d40784941
Test: m mcts
2024-07-29 03:39:13 +00:00
Dan Shi
be0dee8812 Support test runnner option in auto generated test configs
Bug: 284179405
Bug: 236980335
Test: unittest
Change-Id: Ifae3d556ff79153ca6c3067347fc259b665fb2e1
Merged-In: Ifae3d556ff79153ca6c3067347fc259b665fb2e1
2024-01-23 18:28:35 +00:00
Android Build Coastguard Worker
9387734632 Merge cherrypicks of ['googleplex-android-review.googlesource.com/24029571', 'googleplex-android-review.googlesource.com/24029572', 'googleplex-android-review.googlesource.com/24029573'] into udc-release.
Change-Id: Ib5fbc66dcb08506f95519c22f2b1d1fe96cedd3e
2023-07-14 01:30:43 +00:00
Wei Li
a0b85cd731 Add integration test for m build SBOM of APEXs/APKs.
Bug: 266726655
Test: build/soong/tests/sbom_test.sh
(cherry picked from https://android-review.googlesource.com/q/commit:59df0ee44206557cbe18ce42117b201f4d858bee)
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:b68bfc65d82c360656adeec56efaf24775658d30)
Merged-In: Id8002042f607f8e158f561ca47e0a84a8b8927e2
Change-Id: Id8002042f607f8e158f561ca47e0a84a8b8927e2
2023-07-14 01:24:23 +00:00
Wei Li
7e6fdb5d32 Cleanup SBOM test script for later adding tests of generating SBOM of
unbundled APKs/APEXs.

Bug: 266726655
Test: build/soong/tests/sbom_test.sh
(cherry picked from https://android-review.googlesource.com/q/commit:cd9948f66e9686e83cbe86d2b8ee998564caff0f)
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:1b2badc435c135e3e2c5996f4a5a352da1bb179a)
Merged-In: I2bb3e8405dad716837d3004d4c6fd54ae80527c1
Change-Id: I2bb3e8405dad716837d3004d4c6fd54ae80527c1
2023-07-14 01:24:17 +00:00
Wei Li
dbfb42e50b Exclude diffs caught by sbom_test.
Bug: 284279034
Test: build/soong/tests/sbom_test.sh
(cherry picked from https://android-review.googlesource.com/q/commit:704146094a262f1f7e99ee8606469834ec142a34)
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:92275ff913c6d41d6e85f5f622735df69bb9ad5f)
Merged-In: I152c2e2c55b6547b2dddf7b1b2524681c9af952e
Change-Id: I152c2e2c55b6547b2dddf7b1b2524681c9af952e
2023-07-14 01:24:09 +00:00
Android Build Coastguard Worker
29eb3ec050 Snap for 10331563 from 207a631f9c to udc-release
Change-Id: Ibf347435f688356099a727447ad2c059951e1cdc
2023-06-15 23:01:24 +00:00
Gurpreet Singh
207a631f9c [automerger skipped] DO NOT MERGE Add genrule to build *.latest.version build target. am: 8a7dad00c2 -s ours
am skip reason: subject contains skip directive

Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/23638331

Change-Id: I5d87e013957af1cb79476a1e4cf291e3281485bc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-14 20:02:38 +00:00
Gurpreet Singh
8a7dad00c2 DO NOT MERGE Add genrule to build *.latest.version build target.
Build a new target *.latest.version which will contain a text file
containing the last finalized version.

Bug: 242316893
Test: atest prebuilt_apis_test
(cherry picked from https://android-review.googlesource.com/q/commit:daa314ac97d5ab8076113ee7f269b4e4cc3cf620)

Merged-In: I41fa91c9ec273f342b7807c66c4d65ba13260124
Change-Id: I41fa91c9ec273f342b7807c66c4d65ba13260124
2023-06-14 16:35:37 +00:00
Android Build Coastguard Worker
e93ba98cbc Snap for 10277839 from 9825a6c7f8 to udc-release
Change-Id: Ib379a5e2f85085991fdd07549cec873ef74dea05
2023-06-07 23:01:14 +00:00
Yi Kong
9825a6c7f8 afdo: Remove -fprofile-sample-accurate flag
-fprofile-sample-accurate allows the compiler to de-optimize cold code
paths according to the profile. However we have a number of micro-
benchmarks that tests these paths and we often trigger regression
reports from those benchmarks.

Turning off the flag mitigates the issue at a cost of ~2MB increase in
system image size. But the more deterministic codegen could reduce the
differential OTA size.

Test: presubmit
Bug: 283235002
(cherry picked from https://android-review.googlesource.com/q/commit:febf8b9bdf40b086a50930901a7ccfaaa628bcba)
Merged-In: I1016f573f21a60223a97c64f5818f0e7e66e41e3
Change-Id: I1016f573f21a60223a97c64f5818f0e7e66e41e3
2023-06-06 17:19:50 +00:00
Android Build Coastguard Worker
20fca00481 Snap for 10196304 from 98f13dd1a0 to udc-release
Change-Id: I3c25a7f8a9418fb6ab73ff97132ce2147c3b613a
2023-05-24 23:01:04 +00:00
Yu Liu
98f13dd1a0 Merge "Revert "Revert "mixed builds correctly reference stubs libs""" into udc-dev 2023-05-24 17:15:05 +00:00
Yu Liu
2b9f3f983b Merge "Fix a bug where CppFlags should have been Cppflags" into udc-dev 2023-05-24 17:14:33 +00:00
Yu Liu
4f0c490ac9 Merge "Do not modify input in-place" into udc-dev 2023-05-23 23:27:34 +00:00
Treehugger Robot
66902d7ec0 Merge "VSDK: etc snapshot may have sub_dir for relative_install_path" into udc-dev 2023-05-23 23:19:22 +00:00
Android Build Coastguard Worker
265b065bf2 Snap for 10188272 from e80e5d8531 to udc-release
Change-Id: I046ccd923ce9b6ac640ca9fbe7fcb82742b33211
2023-05-23 23:00:53 +00:00
Yu Liu
67c131f75f Fix a bug where CppFlags should have been Cppflags
Bug: 284009449
Test: unit test and manual build
(cherry picked from https://android-review.googlesource.com/q/commit:93893ba061e774c30a647d42e011838822153511)

Merged-In: I9abb056e6b820414707247d1b19ba6aabffc26ea
Change-Id: I9abb056e6b820414707247d1b19ba6aabffc26ea
2023-05-23 19:49:43 +00:00
Yu Liu
267a137415 Merge "Differentiate between empty and nil input" into udc-dev 2023-05-23 19:42:30 +00:00
Yu Liu
e80e5d8531 Merge "Revert "Make min_sdk overridable in override_apex"" into udc-dev 2023-05-23 19:32:23 +00:00
Yi Kong
3de0cb7b4d Update clang version for Rust bindgen to clang-r487747c
Test: presubmit
Bug: 279955553
(cherry picked from https://android-review.googlesource.com/q/commit:6974c7ec725a948a56cd8e83bff4a2cc9cf909e3)
Merged-In: I9092263024b5b8dc7a1538b00f318ef0d5c29bb7
Change-Id: I9092263024b5b8dc7a1538b00f318ef0d5c29bb7
2023-05-23 07:27:03 +00:00
Sam Delmerico
db5d662663 Revert "Revert "mixed builds correctly reference stubs libs""
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
2023-05-22 22:43:51 +00:00
Spandan Das
ee84727d95 Do not modify input in-place
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
2023-05-22 22:42:19 +00:00
Spandan Das
de41a698f1 Differentiate between empty and nil input
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
2023-05-22 22:41:59 +00:00
Liz Kammer
9a65ff8d1f Revert "Make min_sdk overridable in override_apex"
This reverts commit 133c55b48a.

Reason for revert: change was untested and not working

Bug: 266945903

(cherry picked from https://android-review.googlesource.com/q/commit:bd58e746928bdfd618ba81e66a19dc42f7b15380)
Merged-In: I06d6e3c439ba541ae85dc148f91b184b9731b92d
Change-Id: I06d6e3c439ba541ae85dc148f91b184b9731b92d
2023-05-22 22:39:46 +00:00
Android Build Coastguard Worker
d5ed94c652 Snap for 10174557 from dabeb50e32 to udc-release
Change-Id: Ibe112dbeea6f32a6dd69270cfa7984009a6fb983
2023-05-20 21:01:14 +00:00
Android Build Coastguard Worker
10076ad13f Snap for 10171451 from 16ef197d6a to udc-release
Change-Id: Iab5a36a42fc921eadfe40f7e8c1751124d9c8c1c
2023-05-20 01:06:05 +00:00
Wei Li
dabeb50e32 Merge changes from topic "cherrypicker-L80700000960770298:N69600001370607907" into udc-dev
* changes:
  Change bp2build converter of module "package".
  Export some make variables to Bazel through product variables.
2023-05-19 21:37:23 +00:00
Treehugger Robot
16ef197d6a Merge "Don't panic if no certificates found" into udc-dev 2023-05-19 16:18:34 +00:00
Android Build Coastguard Worker
ebbeae833e Snap for 10162339 from 4020b810e9 to udc-release
Change-Id: I14725232c065b2be80005049f318bb0a93b122f5
2023-05-19 01:09:42 +00:00
Wei Li
dff65b0114 Change bp2build converter of module "package".
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
2023-05-19 00:35:57 +00:00
Wei Li
5cfedc8062 Export some make variables to Bazel through product variables.
Bug: 275472038
Test: CIs
(cherry picked from https://android-review.googlesource.com/q/commit:c642d688d6a091766536f0e02696d43e393f93e0)
Merged-In: I4fdd0f989d75045644e8f2e32d1eb77543a3b9f3
Change-Id: I4fdd0f989d75045644e8f2e32d1eb77543a3b9f3
2023-05-19 00:35:50 +00:00
Wei Li
9d307945be Allowlist SBOM generation tool so it can be used in Bazel.
Bug: 275472038
Test: b build //build/make/tools/sbom:generate-sbom && bazel-out/aosp_cf_x86_64_phone-userdebug_linux_x86_64-opt/bin/build/make/tools/sbom/generate-sbom
(cherry picked from https://android-review.googlesource.com/q/commit:74e3e003148d202749cc79456e61f65ba1f4f25a)
Merged-In: I4ad68b0613410f40c79ee24d3eef779c2ad57815
Change-Id: I4ad68b0613410f40c79ee24d3eef779c2ad57815
2023-05-18 21:52:23 +00:00
Yi Kong
79b9b94ea3 Revert "Turn off stack protector check for noreturn calls"
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
2023-05-18 18:20:09 +00:00
Zyan Wu
d1f548a19d Don't panic if no certificates found
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
2023-05-18 15:58:20 +08:00
Treehugger Robot
4020b810e9 Merge "Touch soong_build output at the end of main" into udc-dev 2023-05-17 19:14:54 +00:00
Chris Parsons
74ac376769 Touch soong_build output at the end of main
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
2023-05-17 18:09:56 +00:00
Justin Yun
82283a3b4f VSDK: etc snapshot may have sub_dir for relative_install_path
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)
2023-05-17 10:51:28 +09:00
Android Build Coastguard Worker
ef7fbcc779 Snap for 10147226 from 0bd58ceeec to udc-release
Change-Id: Id07aba57645a45c9ceb907dd289af2ba160b5c32
2023-05-16 23:05:43 +00:00
Treehugger Robot
0bd58ceeec Merge "Update clang version to clang-r487747c" into udc-dev 2023-05-15 21:01:41 +00:00
Android Build Coastguard Worker
54e79e5dc7 Snap for 10127524 from 5f5a17fd6b to udc-release
Change-Id: Ie1a6a1aac7d5765c5d07d64db7387d21f0249a5e
2023-05-13 01:06:10 +00:00
Jiakai Zhang
5f5a17fd6b Dexpreopt ART jars and framework jars together.
Bug: 280776428
Test: atest art_standalone_dexpreopt_tests
Test: -
  1. m
  2. Check .invocation file (http://gpaste/6498044089466880)
  3. Check files in $ANDROID_PRODUCT_OUT/system/framework/x86_64
Test: -
  1. m dist
  2. Check files in out/dist/boot.zip
Test: -
  1. art/tools/buildbot-build.sh --host
  2. m test-art-host-gtest
  3. art/test/testrunner/testrunner.py --host
Test: m build-art-target-golem
(cherry picked from https://android-review.googlesource.com/q/commit:c08c162b5a82ddfc44e9944d798636b2241308de)
Merged-In: I89490252e56a05edab03fdddc6539fa4d7f79756
Change-Id: I89490252e56a05edab03fdddc6539fa4d7f79756
2023-05-12 11:16:31 +00:00
Jiakai Zhang
7ba1ca0ac3 Unify installDirOnHost and installDirOnDevice.
These two fields never do what they are described to do. This CL unifies
them to avoid the confusion.

Bug: 280440941
Test: m
(cherry picked from https://android-review.googlesource.com/q/commit:09d88df0407263e846b01c226184b262f2e36678)
Merged-In: I3652d73a50832a2e494d9f5cae750f5fc38293b4
Change-Id: I3652d73a50832a2e494d9f5cae750f5fc38293b4
2023-05-12 11:16:22 +00:00
Jiakai Zhang
4e9eb1ae46 Remove the ability to install boot images by bootclasspath_fragments.
We don't need this anymore because we are going to compile ART jars and
framework jars together.

Bug: 280776428
Test: m
(cherry picked from https://android-review.googlesource.com/q/commit:b47caccbc037b65462f757c462a99732ad6dd51c)
Merged-In: I070157530449a1bb5779e25984c367df3dde7b36
Change-Id: I070157530449a1bb5779e25984c367df3dde7b36
2023-05-12 11:16:10 +00:00
Jiakai Zhang
c67528bf7e Prepare tests for dexpreopt changes.
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
2023-05-12 11:16:01 +00:00
Jeongik Cha
bc9256b531 Get rid of DeviceName() from path related to dexpreopt
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
2023-05-12 11:15:51 +00:00
Yi Kong
e3a5103cba Update clang version to clang-r487747c
Test: presubmit
Bug: 279955553
Change-Id: Ibe3b5e81f7850560b340c89a1f83d5ebdf4fc25f
Merged-In: Ibe3b5e81f7850560b340c89a1f83d5ebdf4fc25f
(cherry picked from commit 1c22301735)
2023-05-11 16:52:11 +01:00
Android Build Coastguard Worker
2a2da661e5 Snap for 10106040 from 51babf3c4c to udc-release
Change-Id: Ief4ec76b452c9ac26701cdfd6cf6944e4673f58d
2023-05-10 23:01:28 +00:00
Jiakai Zhang
51babf3c4c Merge changes from topic "cherrypicker-L72800000960451564:N93200001365390015" into udc-dev
* changes:
  Generate app profiles even if dexpreopt is disabled.
  Generate boot image profiles even if dexpreopt is disabled.
2023-05-10 13:38:14 +00:00
Treehugger Robot
1dd392b123 Merge "VSDK: use relative install path when generating snapshots" into udc-dev 2023-05-10 06:00:16 +00:00