Commit graph

64211 commits

Author SHA1 Message Date
Victor Chang
32952b975d Merge "Add com.android.tools.r8.emitRecordAnnotationsExInDex flag" 2023-04-04 11:12:05 +00:00
Jingwen Chen
37eec7d019 Merge "Revert "Allowlist more of system/timezone"" 2023-04-04 04:09:26 +00:00
Cole Faust
5bc31c11ba Merge "Keep existing build files in build/make/target/product/security" 2023-04-04 03:58:15 +00:00
Treehugger Robot
f590058fd2 Merge "Make outputApexFile relative to module dir in mixed builds" 2023-04-04 01:35:10 +00:00
Wei Li
0766f4c66c Merge "Update the SBOM integration test to include ramdisk partition and resolve some diffs." 2023-04-04 00:55:38 +00:00
Jihoon Kang
91a86d4112 Merge "Add dep_api_srcs property to java_api_library module" 2023-04-03 23:42:19 +00:00
Jiyong Park
7a64621169 Merge "Assert that platform_sdk_codename is set" 2023-04-03 23:28:58 +00:00
Jingwen Chen
83a4b68ff4 Revert "Allowlist more of system/timezone"
This reverts commit da03b08062.

Reason for revert: This was previously reverted in aosp/2510617 due to b/275666961, which spawned b/276416537 and b/276416485 that Cole and I are working on now. Given that the root causes are still being actively resolved, I believe this will cause the test (b/275666961) to fail again.

Change-Id: I69e756f823f920610a832a1fc88b415074c0f488
2023-04-03 23:22:54 +00:00
Treehugger Robot
43a2a9a5c6 Merge changes from topic "fdo_profile"
* changes:
  Reimplement afdo support for rust
  Implement fdo_profile module type
2023-04-03 22:35:25 +00:00
Cole Faust
b0bfa07919 Make outputApexFile relative to module dir in mixed builds
Otherwise when other modules use the apex as data (for example, in
tests) they get the full path from the root of the workspace to the
apex.

Fixes: 276416485
Test: atest timezone_data_e2e_tests:com.android.tests.apex.TimezoneDataHostTest#testStageActivateUninstallApexPackage -- --abi x86_64 then tree out/host/linux-x86/testcases/timezone_data_e2e_tests
Change-Id: Id740856794770df2edc55dfff5f6f938fc31d0c5
2023-04-03 14:28:36 -07:00
Treehugger Robot
d61ea3580d Merge "Set OUT_DIR=out with no src_deps." 2023-04-03 19:01:58 +00:00
Jihoon Kang
01e522cac5 Add dep_api_srcs property to java_api_library module
Users can pass the jar-file creating module via dep_api_srcs property in
java_api_library to create the jar file not by compiling the stubs
generated from metalava but by extracting and zipping the class files
from the jar file of the input module.

Test: m android-non-updatable.stubs.from-text
Bug: 273381329
Change-Id: Id1b75179111cc7ff45faaff58388db1347bb18e5
2023-04-03 17:53:40 +00:00
Liz Kammer
5342482043 Merge "Allowlist more of system/timezone" 2023-04-03 17:43:17 +00:00
Treehugger Robot
71585a0187 Merge changes Ib9ff4eb5,If27a050c
* changes:
  add *.from-text modules to the java test fixture
  Create a SetBuildFromTextStub method
2023-04-03 16:44:08 +00:00
Spandan Das
77e3278c50 Merge "Rename core stubs to .txt stubs if applicable" 2023-04-03 16:37:53 +00:00
Alix Espino
2173e6545a Merge "Simplify logic in Soong ApiLevelFromUserWithConfig" 2023-04-03 13:41:02 +00:00
Jiyong Park
3a00e3defb Assert that platform_sdk_codename is set
This is already the case for bazel. Soong should do the same.

Bug: 271277773
Test: m nothing
Change-Id: Ibb680801872bd04eade511e1a174cc629af80722
2023-04-03 20:36:40 +09:00
Treehugger Robot
1c102d34b7 Merge "Remove stub-annotations from art stubs system modules" 2023-04-03 10:49:15 +00:00
Rebecca Chyung
20d1290cfa Merge "Revert "Fix NDK library sysroot arrangement."" 2023-04-03 06:08:42 +00:00
Rebecca Chyung
961cf1cf9c Revert "Fix NDK library sysroot arrangement."
This reverts commit 169256f535.

Reason for revert: DroidMonitor-triggered revert due to breakage https://android-build.googleplex.com/builds/build-details/9868109/targets/mokey-userdebug, bug b/276513771

Change-Id: Iea77994cd4ff0f61a8fa72e52cd1b601bc7cc1a0
2023-04-03 06:06:58 +00:00
Peter Collingbourne
0dcd62e8a0 Set OUT_DIR=out with no src_deps.
Some Rust crates with no src_deps have generated files checked in in an
"out" subdirectory and included via a reference to $OUT_DIR, such as
external/rust/crates/userfaultfd-sys.

Astonishingly, some people must be leaving $OUT_DIR set to the default
value of "out", because with $OUT_DIR set to this value, building these
crates would presumably succeed. For everyone else, the build fails
when building one of these crates because it will attempt to load from
the wrong directory. Presumably these crates should be using src_deps
instead (and once that's fixed, we should probably *unset* $OUT_DIR in
rustc invocations to prevent the same thing from happening again), but
for now, fix the build with non-default OUT_DIR by explicitly setting
OUT_DIR to "out" if there are no src_deps.

Change-Id: I09f99424fc01a1e42e910622c77ab8f7312819bd
2023-04-01 01:34:19 -07:00
Treehugger Robot
553d89a825 Merge "Fix rust snapshotInfo provider bug" 2023-04-01 06:41:25 +00:00
Cole Faust
10b94de0b6 Keep existing build files in build/make/target/product/security
To add a new filegroup for certificates in that folder.

Bug: 269577299
Test: See other cl
Change-Id: I1c41c809ee3ec6838a427d18f2d21fec9571ccb6
2023-03-31 17:43:06 -07:00
Vinh Tran
cde1016aff Reimplement afdo support for rust
Ignore-AOSP-First: The parent CL is internal
Bug: 267229065
Test: go test
Change-Id: Ia14679285b92f3f14ff269392a61f978c71311b2
Merged-In: Ia14679285b92f3f14ff269392a61f978c71311b2
2023-03-31 17:55:16 -04:00
Vinh Tran
44cb78c988 Implement fdo_profile module type
Introducing fdo_profile module type to reimplement the afdo support in cc moduels. This change allows the feature to be compatible with Bazel migration.

How it works:

PreDepsMutators:
  * BeginMutator: If non-static cc modules sets afdo prop, search and add corresponding fdo_profile module as a dep with fdoProfileTag
  * fdoProfileMutator:
    * If in fdo_profile module, set FdoProfileProvider with full path to profile
    * If in cc module, read FdoProfileProvider from dep with fdoProfileTag and set FdoProfileInfo.Path to FdoProfilePath field

PostDepsMutators:
  * afdoDepsMutator: If a module has FdoProfilePath set, walk to its static deps and set itself to the deps' AfdoRdeps
  * afdoMutator: If a static dep has AfdoRDeps set, create afdo variant.

Ignore-AOSP-First: Other CLs in the same topic are internal-only
Test: go test
Bug: b/267229065
Change-Id: I687d798a02d9743c92804fea36fb4ae3a7a0e5e3
Merged-In: I687d798a02d9743c92804fea36fb4ae3a7a0e5e3
2023-03-31 17:52:01 -04:00
Treehugger Robot
88c8d207ca Merge "Add spdx-tools and licenseclassifier to soong mocks" 2023-03-31 21:25:37 +00:00
Treehugger Robot
cdbb1a999f Merge changes Ie9d465f5,Idd89d656,I0a13a0e7
* changes:
  Create core_platform system modules from .txt files
  Create system modules using .txt stubs
  Create a defaults module for stripping out annotations
2023-03-31 19:37:01 +00:00
Spandan Das
a335e1de36 Remove stub-annotations from art stubs system modules
This system module is used to compile conscrypt and icu stubs. These
have migrated to java_sdk_library that set `annotations_enabled: true`
explicitly.

Test: m
Test: TH
Change-Id: I65ceb1fbf0dcdbb3504b69ebce6ca8f0b67e964d
2023-03-31 19:28:55 +00:00
Peter Collingbourne
bc03688e7c Merge "cuttlefish: Stop building the CVD host package tarball by default." 2023-03-31 19:09:32 +00:00
Dan Albert
dfe24db34f Merge "Fix NDK library sysroot arrangement." 2023-03-31 18:54:46 +00:00
Treehugger Robot
840d49a564 Merge "rename aidl/library.bzl to aidl/aidl_library.bzl" 2023-03-31 18:26:33 +00:00
Ibrahim Kanouche
7c1de51d9e Add spdx-tools and licenseclassifier to soong mocks
Change-Id: I8d394fe1f0633f433b76f66929294e6537e1f809
2023-03-31 17:19:29 +00:00
Treehugger Robot
2d704998f4 Merge changes I1ed3ab24,I68678ddf
* changes:
  Use stubs from .txt files for hiddenapi
  Rename JavaLibraryNameFromText function
2023-03-31 14:59:30 +00:00
Alix
fb502512cb Simplify logic in Soong ApiLevelFromUserWithConfig
Currently, ApiLevelFromUser calls ReplaceFinalizedCodename(raw).
This function checks whether raw is in the getFinalCodenamesMap which is
equivalent to ApiLevelsMapReleasedVersion with an additional entry for current.

Since ApiLevelFromUserWithConfig already returned on the raw = "current"
we only care about ApiLevelsMapReleasedVersion and can avoid the unecessary
use of strconv.Atoi(strconv.Itoa(raw)) that calling ReplaceFinalizedCodename
ends up doing.

Also makes the function look more like the Bazel version in
build/bazel/rules/common/api.bzl

Change-Id: I8c03fc159d7f63298273624f030d1956e2307615
Test: m bp2build
2023-03-31 14:55:13 +00:00
Sam Delmerico
b72610665c Merge "improve error handling for SourceRootDirs" 2023-03-31 14:48:56 +00:00
Sam Delmerico
e55bf08de2 rename aidl/library.bzl to aidl/aidl_library.bzl
Test: b test --config=android //build/bazel/...
Change-Id: I7e22ee5ffa391ddaf43a3eec17812be78f2d86ab
2023-03-31 09:48:27 -04:00
Treehugger Robot
10361f5177 Merge "rust_proto: use protobuf crate version 2.x" 2023-03-31 10:37:24 +00:00
Victor Chang
397e7e2e89 Add com.android.tools.r8.emitRecordAnnotationsExInDex flag
It enables annotations for record components.

Bug: 272698028
Test: m droid
Change-Id: I9b45526c2dcdb2de458d874a0c222108a69eee71
2023-03-31 11:01:41 +01:00
Inseob Kim
cd2b46aae3 Fix rust snapshotInfo provider bug
We must pass pointer of pointer to correctly cash snapshotInfo and
register provider only once.

Bug: 271215084
Test: build
Change-Id: Ia7b43c7b97a8fcabd3b4d6ac8b990c622b6ceb6e
2023-03-31 18:04:12 +09:00
Prashanth Swaminathan
3b7cb59e4e Merge "Enable sext.w removal for riscv targets" 2023-03-31 05:46:04 +00:00
Cole Faust
e28bde81fd Merge "Move the testing platforms out of soong_injection" 2023-03-31 00:17:33 +00:00
Peter Collingbourne
ff56c0124f cuttlefish: Stop building the CVD host package tarball by default.
This change causes us to stop building the CVD host package during
the default `m` build, as this is one of the most time consuming steps
of incremental builds, taking around a minute on my machine. Instead,
we build a directory containing the host package contents. A companion
change to acloud teaches it to upload the directory if it exists.

The host package tarball will continue to be built with `m dist` and `m
hosttar`. When building the host package, just create it from the package
contents directory instead of going through a zip file as we were before.

Bug: 273862156
Change-Id: Id7ab47cd5a2e96d073fcc21ed82d3719119df6b9
2023-03-30 16:44:28 -07:00
Spandan Das
6bd19dd4c5 add *.from-text modules to the java test fixture
Test: go build ./java

Change-Id: Ib9ff4eb59ff63dc208b7a28626d42b53153c86d6
2023-03-30 21:37:54 +00:00
Prashanth Swaminathan
bce5507c02 Enable sext.w removal for riscv targets
Bug: 275574215
Test: Verified boot complete on aosp_cf_riscv64_phone target.
Change-Id: I771dbc492075eec18919b66dc74ae524e3f4b3cd
2023-03-30 20:06:50 +00:00
Steven Moreland
97f5966f49 Merge "sbox: print more errors" 2023-03-30 18:25:59 +00:00
Sam Delmerico
5121153568 improve error handling for SourceRootDirs
Previously, warnings about missing modules were printed directly to
stderr. Instead we can pass these messages along as errors using the
existing pathways.

Bug: 269457150
Test: m nothing
Test: add -external to PRODUCT_SOURCE_ROOT_DIRS and observe missing
  module errors
Change-Id: I7273c427f38024e3c288f1ecb31175ed04ac44a6
2023-03-30 14:22:38 -04:00
Spandan Das
4deab28fd4 Create a SetBuildFromTextStub method
This will be useful for writing unit tests

Test: go build ./android
Change-Id: If27a050c0cfd0492e0cd3a422ac33f40b7a0a6d5
2023-03-30 17:06:32 +00:00
Liz Kammer
da03b08062 Allowlist more of system/timezone
This helps enable better testing of tzdata apex building.

Test: b build --config=android //system/timezone/...
Change-Id: Iec0d2393366fa612f24c57b6ae2d4f7bfe181668
2023-03-30 11:02:14 -04:00
Treehugger Robot
7c907b84e7 Merge "Add more modules in HugeModulesMap" 2023-03-30 12:00:38 +00:00
Jingwen Chen
29c4561a6b bp2build: denylist some modules to fix CI breakage.
Test: presubmits
Fixes: 276107812
Change-Id: I5e698b26f4d20de6c50008ab12fcfbef8a108ecb
2023-03-30 09:39:40 +00:00