Commit Graph

98051 Commits

Author SHA1 Message Date
Dennis Shen
d557389eb1 Merge "aconfig: update storage file mapping api" into main am: 260663ddfc
Original change: https://android-review.googlesource.com/c/platform/build/+/3075404

Change-Id: I387e6348f22e8b66295cda36882bd90aeda743c6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-07 14:14:33 +00:00
Dennis Shen
260663ddfc Merge "aconfig: update storage file mapping api" into main 2024-05-07 14:10:47 +00:00
Mårten Kongstad
a7ddcf32bc Merge "check-flagged-apis: record super class when parsing classes" into main am: 5413a1e55d
Original change: https://android-review.googlesource.com/c/platform/build/+/3075496

Change-Id: I7cec1f5e1c4f04ae395b3f05ee9efeaf89f46cc7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-07 14:03:56 +00:00
Treehugger Robot
1947cceae4 Merge changes Ia6dfcfa8,I8d93c230,I4db7ff47,I003535c7,I8c0619fa into main am: 4925954a79
Original change: https://android-review.googlesource.com/c/platform/build/+/3075227

Change-Id: Ib6047a8e66cd9c868755c387fd8de3d146eff7fc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-07 14:03:38 +00:00
Mårten Kongstad
5413a1e55d Merge "check-flagged-apis: record super class when parsing classes" into main 2024-05-07 13:52:21 +00:00
Treehugger Robot
4925954a79 Merge changes Ia6dfcfa8,I8d93c230,I4db7ff47,I003535c7,I8c0619fa into main
* changes:
  check-flagged-apis: consider interfaces when looking up symbol
  check-flagged-apis: skip self-referential interfaces
  check-flagged-apis: record interfaces when parsing classes
  check-flagged-apis: add more details to Symbol class
  check-flagged-apis: api-versions.xml: correctly parse nested class ctor
2024-05-07 13:42:25 +00:00
Mårten Kongstad
e812039036 check-flagged-apis: consider superclasses when looking up symbol
If a symbol can't be found in a class, (recursively) check the class'
superclass before reporting the symbol as missing.

Bug: 334870672
Test: atest --host check-flagged-apis-test
Change-Id: I8ef1fbfcc51e0c5ba00959536c087213d688fe39
2024-05-07 13:28:54 +02:00
Mårten Kongstad
c3f05a6d92 check-flagged-apis: record super class when parsing classes
Extend ClassSymbol with a nullable reference to the class' superclass.

Bug: 334870672
Test: atest --host check-flagged-apis-test
Change-Id: Ia2741a4d7fb5de908a03ef640f5fcd38d0ce0e28
2024-05-07 13:28:53 +02:00
Mårten Kongstad
d2c707613e check-flagged-apis: consider interfaces when looking up symbol
When searching for potential errors, if a symbol can't be found in the
api-verions.xml data, check if it is present in any of the class'
interfaces.

A follow-up CL will add similar logic to handle super classes.

Bug: 334870672
Test: atest --host check-flagged-apis-test
Change-Id: Ia6dfcfa8495b89465db60f6a4eb77d304112046b
2024-05-07 13:28:53 +02:00
Mårten Kongstad
04d8b46c37 check-flagged-apis: skip self-referential interfaces
The return value of ClassItem.allInterfaces will sometimes include the
interface itself (e.g.
android.accessibilityservice.BrailleDisplayController). It is unclear
when this happens; it doesn't happen for the unit test.

Update the logic to record the interfaces for a class to filter out
interfaces named the same as the class.

Bug: 334870672
Test: atest --host check-flagged-apis-test
Test: croot && ./build/tools/check-flagged-apis/check-flagged-apis.sh
Change-Id: I8d93c230dfedde30e8d43fefd560a47944085d3a
2024-05-07 13:16:13 +02:00
Mårten Kongstad
7c3571fe8b check-flagged-apis: record interfaces when parsing classes
Extend ClassSymbol with a list of the interfaces that class implements.
This will be used in a follow-up CL to improve the logic that checks if
a class member exists in the api-versions.xml data.

Bug: 334870672
Test: atest --host check-flagged-apis-test
Change-Id: I4db7ff47c3ce40ca892cb872810dd559426dfcb8
2024-05-07 13:16:13 +02:00
Mårten Kongstad
a1fe37137e check-flagged-apis: add more details to Symbol class
Change Symbol from a wrapper around a String to a more fleshed out data
class; symbols now encode if they represent a class, or a class member
(including a reference to the containing class).

Bug: 334870672
Test: atest --host check-flagged-apis-test
Test: croot && ./build/tools/check-flagged-apis/check-flagged-apis.sh # with and without this CL; the output should be the same
Change-Id: I003535c721c45d559d00fb3e008325e1db0e18c0
2024-05-07 13:16:13 +02:00
Mårten Kongstad
02525a88de check-flagged-apis: api-versions.xml: correctly parse nested class ctor
The constructor of a nested class is represented as follows in
api-versions.xml:

  <class name="android/Clazz$Foo$Bar" since="1">
    <method name="&lt;init>()V"/>
  </class>

The nested dollar signs are not replaced by forward slashes before the
parsing logic uses `split("/")` to find the name of the inner-most
class, incorrectly resulting in `Class$Foo$Bar` instead of `Bar`. Fix
this by immediately replacing dollar signs with forward slashes after
extracting the package and class.

Also clean up the following call of `Symbol.create`.

Bug: 334870672
Test: atest --host check-flagged-apis-test
Change-Id: I8c0619faae90ded7eb14dcc20ecb94a086a1c764
2024-05-07 13:16:13 +02:00
Wei Li
3999f3145b Merge "Add license metadata declarations which are moved from device/google/barbet/Android.mk." into main am: f9ce18b5c8 am: fa4f83ea9f
Original change: https://android-review.googlesource.com/c/platform/build/+/3073447

Change-Id: Ib5685cdb6d6689ad44b2f8784a9e1e1c6a2481d3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-07 09:03:50 +00:00
Wei Li
fa4f83ea9f Merge "Add license metadata declarations which are moved from device/google/barbet/Android.mk." into main am: f9ce18b5c8
Original change: https://android-review.googlesource.com/c/platform/build/+/3073447

Change-Id: If3b2b0569265513df94cc90e211d7b38be53f3f6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-07 08:44:34 +00:00
Wei Li
f9ce18b5c8 Merge "Add license metadata declarations which are moved from device/google/barbet/Android.mk." into main 2024-05-07 08:26:35 +00:00
Jiyong Park
0bf9b01e0b Merge "Move fs_config_[files|dirs]_<partition> to soong" into main am: 0a5b852656 am: 2811a2bb5c
Original change: https://android-review.googlesource.com/c/platform/build/+/3074045

Change-Id: I92a86f1b55c506983c13099e26fbe3e8cf0e22ff
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-07 03:03:06 +00:00
Jiyong Park
2811a2bb5c Merge "Move fs_config_[files|dirs]_<partition> to soong" into main am: 0a5b852656
Original change: https://android-review.googlesource.com/c/platform/build/+/3074045

Change-Id: I5112027e0303b0a564e87817a729bee445346490
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-07 02:43:28 +00:00
Jooyung Han
a857f3e897 Merge "Remove unused testdata" into main am: 5548c31901 am: 362fe02d26
Original change: https://android-review.googlesource.com/c/platform/build/+/3074044

Change-Id: I3a78788ca63221d5d4ab9dda8c5bb1a9d75bf93e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-07 02:23:36 +00:00
Jiyong Park
0a5b852656 Merge "Move fs_config_[files|dirs]_<partition> to soong" into main 2024-05-07 02:17:23 +00:00
Jooyung Han
362fe02d26 Merge "Remove unused testdata" into main am: 5548c31901
Original change: https://android-review.googlesource.com/c/platform/build/+/3074044

Change-Id: I8c2262daad4dde71d13cf49c660785ea376ff091
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-07 01:56:20 +00:00
Jooyung Han
5548c31901 Merge "Remove unused testdata" into main 2024-05-07 01:37:05 +00:00
Jihoon Kang
3b81545da3 Merge "Revert "Remove obsolete java compilation artifacts"" into main am: 14a9a7038f am: 73b0456af9
Original change: https://android-review.googlesource.com/c/platform/build/+/3074637

Change-Id: I0727aadff0c8e50fac8946682b2f214afaddbf2f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-07 01:02:28 +00:00
Jihoon Kang
73b0456af9 Merge "Revert "Remove obsolete java compilation artifacts"" into main am: 14a9a7038f
Original change: https://android-review.googlesource.com/c/platform/build/+/3074637

Change-Id: Ib55056a615b0e751d0cc3e599bcdb6d4461636a2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-07 00:24:51 +00:00
Jihoon Kang
14a9a7038f Merge "Revert "Remove obsolete java compilation artifacts"" into main 2024-05-07 00:03:05 +00:00
Jiyong Park
8d6481b92c Move fs_config_[files|dirs]_<partition> to soong
Note that not all partitions are moved to Soong. Soong doesn't yet
support *_dlkm partitions and the oem partition.

This change also removes dead code for support VNDK snapshot.

Finally, as a minor clean up, the leading '_' is dropped from the module
names _fs_config_*. There's no need to hide the module names.

Bug: 337993745
Test: m
Change-Id: I5beec5c6734291b9361f870fc1a8dba19def062e
2024-05-07 08:50:10 +09:00
Jihoon Kang
132fceec4c Revert "Remove obsolete java compilation artifacts"
Revert submission 3070882-sdk_lib_remove_compilation

Reason for revert: Potential culprit for build breakage of barbet-ap2a-userdebug in git_main

Reverted changes: /q/submissionid:3070882-sdk_lib_remove_compilation

Change-Id: I53b229137a8ba45e32209dbe69ab0cf698084377
2024-05-06 22:40:24 +00:00
Treehugger Robot
b5490dec43 Merge "Remove obsolete java compilation artifacts" into main am: cfb1faa3f5 am: 471de13065
Original change: https://android-review.googlesource.com/c/platform/build/+/3070882

Change-Id: I11293fcd12da77ea7c65ebfdda1fb643c75cd1cc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-06 21:39:08 +00:00
Treehugger Robot
471de13065 Merge "Remove obsolete java compilation artifacts" into main am: cfb1faa3f5
Original change: https://android-review.googlesource.com/c/platform/build/+/3070882

Change-Id: Ie9b63d3e2bf4dc5ffb380d355032522be77133a9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-06 21:24:03 +00:00
LaMont Jones
69b2ed6610 Enable build flags in protobuf
If RELEASE_BUILD_FLAGS_IN_PROTOBUF is False, then the results from
out/release-config are ignored and we do the old processing.

The following additional logic all goes away once the migration to protobuf
is finished.

- If we found .textproto files that don't have corresponding .mk files,
  we require protobuf.
- If we found .mk files that don't have corresponding .textproto files,
  we require legacy (make) processing.
- If PRODUCT_RELEASE_CONFIG_MAPS specifies .textproto files, we require
  protobuf.

In order to further isolate migration, the choice can be determined on a
release-config by release-config basis.  in each release config
directory, we look for:
 - `build_config/DEFAULT=proto`
 - `build_config/DEFAULT=make`
 - `build_config/${TARGET_RELEASE}=proto`
 - `build_config/${TARGET_RELEASE}=make`
The last such file found determines which code path is used.

Bug: 328495189
Test: manual, TH
Ignore-AOSP-First: cherrypick
Merged-In: I1d84db76b157082fc7db1b3cb7c9afe8cdf46cbf
Change-Id: I1d84db76b157082fc7db1b3cb7c9afe8cdf46cbf
2024-05-06 21:15:13 +00:00
LaMont Jones
afd6a265a9 Do not use build/trunk_release/release_config_map.mk
We won't be adding build/trunk_release to the manifest.

Bug: 328495189
Test: TH
Ignore-AOSP-First: cherry-pick
Merged-In: I0ef2a900568daccfbd2ef1d8949674e6f2a63e00
Change-Id: I0ef2a900568daccfbd2ef1d8949674e6f2a63e00
2024-05-06 21:15:04 +00:00
LaMont Jones
08924a47a4 Defer "no such release config" error
This allows product-specific release config maps to declare release
configs.

Bug: 328495189
Test: manual
Ignore-AOSP-First: cherry-pick
Merged-In: I862f167062ee647af00a4ec7d4af2966c6be44a8
Change-Id: I862f167062ee647af00a4ec7d4af2966c6be44a8
2024-05-06 21:14:55 +00:00
LaMont Jones
7dd547294d Allow duplicate release config maps and build flag declarations
Only include a release_config_map.mk file the first time it appears in
the list.

If the flag declaration is identical to one already declared, do not
raise an error.

This eases the process of migrating where flags are declared.

Bug: b/328781415
Bug: b/328495189
Test: manual, TH
Ignore-AOSP-First: cherry-pick
Change-Id: I18316e769438f62071723771762d6e89be98b813
Merged-In: I18316e769438f62071723771762d6e89be98b813
2024-05-06 21:14:51 +00:00
LaMont Jones
b5e3f0c2d2 Look for release_config_map.mk in more projects
This allows us to split up build/release for better clarity.

Bug: b/328495189
Test: manual
Ignore-AOSP-First: cherry-pick
Merged-In: If810780de164b74c3e3ebc35260384843de2c084
Change-Id: If810780de164b74c3e3ebc35260384843de2c084
2024-05-06 21:14:44 +00:00
Treehugger Robot
cfb1faa3f5 Merge "Remove obsolete java compilation artifacts" into main 2024-05-06 21:06:54 +00:00
Christopher Ferris
6f43cb09c9 Merge "Add MALLOC_LOW_MEMORY as synonym for MALLOC_SVELTE." into main am: 8e46fa38f1 am: c0a91f8053
Original change: https://android-review.googlesource.com/c/platform/build/+/3064404

Change-Id: I5d18de5a81027bd07735465e4d9c84689cc82028
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-06 20:15:42 +00:00
Spandan Das
9429bf9074 Building mainline modules from source is now the default
RELEASE_APEX_CONTRIBUTIONS_* flags per module will be used to toggle
between sources and prebuilts of a mainline module in ap3a and above in
internal and partner builds.

Test: git_aosp-main-with-phones:aosp_cf_arm64_only_phone-next-userdebug
https://android-build.corp.google.com/builds/abtd/run/L61500030003577619

Test: lunch gsi_partner_arm-ap31-userdebug in v-aml-prebuilt-dev
Test: m out/soong/prebuil_info.json # identical before and after

Bug: 308188056
Change-Id: I308f071763297eb95ca5c8fb0191c8bb794789f7
2024-05-06 20:01:12 +00:00
Christopher Ferris
c0a91f8053 Merge "Add MALLOC_LOW_MEMORY as synonym for MALLOC_SVELTE." into main am: 8e46fa38f1
Original change: https://android-review.googlesource.com/c/platform/build/+/3064404

Change-Id: I35f7a4dac1e4ff98ab8c5254356462ddd931f4e2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-06 19:59:40 +00:00
Christopher Ferris
8e46fa38f1 Merge "Add MALLOC_LOW_MEMORY as synonym for MALLOC_SVELTE." into main 2024-05-06 19:45:06 +00:00
Jihoon Kang
cffe6c2c01 Remove obsolete java compilation artifacts
Test: TH
Bug: 332785297
Change-Id: I114bb4139c08e595c3c5b03a4dc8d39df93262c3
2024-05-06 17:46:22 +00:00
Vilas Bhat
02f0984a65 16k: Enable 16k ELF alignment on all mainline modules
Test: banchan <target>
      get_build_var TARGET_MAX_PAGE_SIZE_SUPPORTED
Bug: 321754477
Change-Id: Ia356d6edbf2f451b17f1780d11607ceb9a4adff4
2024-05-06 17:34:53 +00:00
Dennis Shen
a49f1ba5c5 aconfig: update storage file mapping api
Return a pointer of MappedStorageFile/MutableMappedStorageFile instead
of an object of MappedStorageFile/MutableMappedStorageFile. Now added
destructor for MappedStorageFile/MutableMappedStorageFile to unmap the
in memory file to free up memory.

Bug: b/321077378
Test: atest -c
Change-Id: Iaa02696feb07ff383f0c7e46b645d82e57c38254
2024-05-06 17:25:59 +00:00
Treehugger Robot
c91e5d65b0 Merge "Use complete api-versions.xml for module-lib and system-server" into main am: 5a99056218 am: 3184b3aa69
Original change: https://android-review.googlesource.com/c/platform/build/+/3073724

Change-Id: Ic241e23938b72f6084c911a963d0f1374ef21caf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-03 21:16:33 +00:00
Treehugger Robot
3184b3aa69 Merge "Use complete api-versions.xml for module-lib and system-server" into main am: 5a99056218
Original change: https://android-review.googlesource.com/c/platform/build/+/3073724

Change-Id: I723b009279c71d8c51bf4a05a370b7128b138132
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-03 20:54:12 +00:00
Treehugger Robot
5a99056218 Merge "Use complete api-versions.xml for module-lib and system-server" into main 2024-05-03 20:42:02 +00:00
Wei Li
12458f1b98 Merge "Add proposed trendy teams for CTS modules to be added in platinum." into main am: 961a642955 am: 8f85ac5c1e
Original change: https://android-review.googlesource.com/c/platform/build/+/3073445

Change-Id: I09f45d29e96847ee411b898cd13f70b96431fd0a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-03 19:11:47 +00:00
Wei Li
8f85ac5c1e Merge "Add proposed trendy teams for CTS modules to be added in platinum." into main am: 961a642955
Original change: https://android-review.googlesource.com/c/platform/build/+/3073445

Change-Id: I3070214196220cb501a0d865a14c0815dada9520
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-03 18:54:01 +00:00
Wei Li
961a642955 Merge "Add proposed trendy teams for CTS modules to be added in platinum." into main 2024-05-03 18:28:39 +00:00
Paul Duffin
771a201f3d Use complete api-versions.xml for module-lib and system-server
Previously, the check-flagged-apis.sh script used `api-versions.xml`
for `module-lib` and `system-server` which did not include the
latest up-to-date information about updatable modules or historical
information about sdk extensions which lead to false positives for
APIs from those updatable modules. This changes switches to use the
`api-versions.xml` produced by the new `api_versions_*_complete`
modules which does include that information.

Bug: 337836752
Test: Run script before and after applying this change to make sure
      that flagged APIs from updatable modules are no longer
      reported as missing.
Change-Id: If09e89a4595a19d9f00390fb5fbd24330ec11be5
2024-05-03 12:13:32 +01:00
Treehugger Robot
4f6cf60cb3 Merge "check-flagged-apis.sh: speed up build step" into main am: 984f5ca822 am: c10417e486
Original change: https://android-review.googlesource.com/c/platform/build/+/3074283

Change-Id: Id5d7265e5f9521c8d8dae105f325d747d8ad780d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-03 09:53:41 +00:00