Commit Graph

68143 Commits

Author SHA1 Message Date
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
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
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
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
Treehugger Robot
0bd58ceeec Merge "Update clang version to clang-r487747c" into udc-dev 2023-05-15 21:01:41 +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
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
Jiakai Zhang
1b2f306db8 Generate app profiles even if dexpreopt is disabled.
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
2023-05-09 21:47:33 +01:00
Jiakai Zhang
1d99986d30 Generate boot image profiles even if dexpreopt is disabled.
Bug: 280440941
Test: -
  1. Patch ag/22302622 to disable dexpreopt.
  2. See boot image profiles still generated.
(cherry picked from https://android-review.googlesource.com/q/commit:bc698cd28aa2ee17af208bfd56f003347116ddb0)
Merged-In: I5f7f746ca1d4da660fe0c40115e6c71750dfdccc

Change-Id: I1bf05ade53fa83f3dba46f28a8f9246ba1fdf664
2023-05-09 21:47:31 +01:00
Justin Yun
6bd266b3ec APEX can use any Prebuilt libraries
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)
2023-05-09 07:48:33 +00:00
Jooyung Han
c21c1e4dbf Mark LLNDK prebuilts as LLNDK
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)
2023-05-09 07:47:42 +00:00
Treehugger Robot
70811b4030 Merge "Enable HWASan for multiple modules in one place(Soong)" into udc-dev 2023-05-03 18:44:39 +00:00
Alexei Nicoara
eb6c2a2fba Merge "Revert "DO NOT MERGE: Changing the udc-dev version to 345990000"" into udc-dev 2023-05-03 16:51:16 +00:00
Alexei Nicoara
1240f28d09 Revert "DO NOT MERGE: Changing the udc-dev version to 345990000"
This reverts commit ec0e5a3e97.

Reason for revert: b/280553936

Change-Id: Iad9079f026f46da35f36723937db9bf5771580d1
2023-05-03 16:43:37 +00:00
Justin Yun
38dfc1d7c1 VSDK: use relative install path when generating snapshots
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)
2023-05-03 09:13:20 +09:00
Hang Lu
88086621d1 Enable HWASan for multiple modules in one place(Soong)
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)
2023-05-02 22:44:03 +00:00
Kalesh Singh
e03c3bb67c Merge "16k: Align shared libraries and executables to 4k by default" into udc-dev 2023-05-02 16:12:52 +00:00
Treehugger Robot
e792debb72 Merge "target_sdk_version replacement should respect REL branches" into udc-dev 2023-05-01 18:41:27 +00:00
TreeHugger Robot
00a3591cc6 Merge "Add license visibility to prebuilt vsdk" into udc-dev 2023-04-29 13:40:49 +00:00
Spandan Das
f902b8af82 target_sdk_version replacement should respect REL branches
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)
2023-04-29 03:50:01 +00:00
Juan Yescas
e6979a102c 16k: Align shared libraries and executables to 4k by default
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
2023-04-28 18:29:50 +00:00
Justin Yun
c9ef91211e Add license visibility to prebuilt vsdk
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)
2023-04-27 21:53:03 +09:00
Alexei Nicoara
ec0e5a3e97 DO NOT MERGE: Changing the udc-dev version to 345990000
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
2023-04-27 11:33:32 +00:00
Jooyung Han
fef2ccb868 Merge "Remove deps from Soong intermediate to symbols" into udc-dev 2023-04-27 01:01:28 +00:00
Justin Yun
2b6b7af8f4 Include license information for vendor and host snapshots
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)
2023-04-26 11:27:34 +09:00
Inseob Kim
0548979522 Remove deps from Soong intermediate to symbols
These should be handled by Makefile dependency (LOCAL_REQUIRED_MODULES).

Bug: 278832320
Test: build and see symbol files
(cherry picked from https://android-review.googlesource.com/q/commit:5bedfee4484a8786ccd761212057f8aac9a02eb7)
Merged-In: I80ad9d8e7e8384e2ae3537cc681bc1d1b327d04c
Change-Id: I80ad9d8e7e8384e2ae3537cc681bc1d1b327d04c
2023-04-26 01:19:26 +00:00