Commit Graph

21922 Commits

Author SHA1 Message Date
Yo Chiang
c746c894b3 Merge "APEX should require base module of stub libraries" am: 6345dfde49 am: f8ae216e9c
Change-Id: Id5c8cb5aa416a3e0cf927067fd2bc2fbf6639128
2020-05-07 06:46:05 +00:00
Yo Chiang
f8ae216e9c Merge "APEX should require base module of stub libraries" am: 6345dfde49
Change-Id: Ia137c47464b8bb4ea13ee517c554d75081488f6e
2020-05-07 06:35:22 +00:00
Yo Chiang
6345dfde49 Merge "APEX should require base module of stub libraries" 2020-05-07 06:13:49 +00:00
TreeHugger Robot
67eb8ba040 Merge "Remove networkstack-aidl-interfaces-unstable-java from the whitelist" into rvc-dev am: c40859ae12
Change-Id: Ib0b0b010c4532fc9c5dbcd8c627e54a4ecccbaf4
2020-05-07 06:00:22 +00:00
TreeHugger Robot
c40859ae12 Merge "Remove networkstack-aidl-interfaces-unstable-java from the whitelist" into rvc-dev 2020-05-07 05:43:24 +00:00
Paul Duffin
e7075e83d5 Merge "Encapsulate getter into an extractorProperty structure" am: 97486dbb4b am: bb59252cb2
Change-Id: I870f931d48c05ffe4044c313e103b3fa6ab516d1
2020-05-06 20:41:00 +00:00
Paul Duffin
c907eef457 Merge "Encapsulate properties to be optimized in a container" am: 11c91dc141 am: 77a36cdc8a
Change-Id: Idd18c3cd7282582d56f600121b048fb8bce380f5
2020-05-06 20:40:52 +00:00
Paul Duffin
bb59252cb2 Merge "Encapsulate getter into an extractorProperty structure" am: 97486dbb4b
Change-Id: I32720b04f935a260dd8a11698569c0aede95d8d1
2020-05-06 20:28:52 +00:00
Paul Duffin
77a36cdc8a Merge "Encapsulate properties to be optimized in a container" am: 11c91dc141
Change-Id: If8a586aa4bced69542ff99cfc5a8dd437645351c
2020-05-06 20:28:44 +00:00
Paul Duffin
97486dbb4b Merge "Encapsulate getter into an extractorProperty structure" 2020-05-06 20:18:39 +00:00
Paul Duffin
11c91dc141 Merge "Encapsulate properties to be optimized in a container" 2020-05-06 20:18:22 +00:00
Makoto Onuki
e181e6bcfa [automerger skipped] Merge "Merge the "big 3" metalava invocations into one" am: 574cc84a33 am: 308b257151 -s ours
am skip reason: Change-Id Ia1a5510b57d58748b4655473d4585636deb7f45e with SHA-1 194c43f5a7 is in history

Change-Id: Ia811f37681c1bcbd594ecc2fa3669440094213e9
2020-05-06 19:58:22 +00:00
Makoto Onuki
308b257151 Merge "Merge the "big 3" metalava invocations into one" am: 574cc84a33
Change-Id: I11ae24ed9c5c17c5842ccf71e571ee722ab7d8aa
2020-05-06 19:39:34 +00:00
Makoto Onuki
574cc84a33 Merge "Merge the "big 3" metalava invocations into one" 2020-05-06 19:18:12 +00:00
Paul Duffin
b28369a982 Encapsulate getter into an extractorProperty structure
Refactors the existing code to wrap a getter with a structure in order
to simplify adding additional per-property information. Adds an
emptyValue field to contain the empty value appropriate for the field
type.

Bug: 155628860
Test: m nothing
Change-Id: I7e169bd9b6e51b88e35bdf8673a5056337f778c1
2020-05-06 18:40:41 +01:00
Paul Duffin
f34f6d8538 Encapsulate properties to be optimized in a container
This allows additional metadata to be associated with a set of
properties that will be used in a follow up change to filter
properties that are ignored in some variants (e.g. host variants).

Bug: 155628860
Test: m nothing
Change-Id: Ie83c1ffbb71fd5d7a08d350571dad3e3209b1431
2020-05-06 18:40:41 +01:00
Artur Satayev
93649101af [automerger skipped] Introduce min_sdk_version to deps info. am: 388d39ba9a -s ours
am skip reason: Change-Id Ie6568cb8a82d5cca9a3dc91b5a068abf4b0632dc with SHA-1 480e25b74f is in history

Change-Id: Ica60e5a7c4e6a5717e03978e11c21484131b9bab
2020-05-06 17:07:33 +00:00
Anton Hansson
9c8069d2af Merge "Merge the "big 3" metalava invocations into one" into rvc-dev-plus-aosp 2020-05-06 17:02:05 +00:00
Kris Alder
6930ece921 add researcher_submitted field to cc_fuzz am: e051d0d324 am: e2967d8f4e
Change-Id: I7d92396453a94d259004083c5f6ecdba58fce293
2020-05-06 17:01:11 +00:00
Kris Alder
e2967d8f4e add researcher_submitted field to cc_fuzz am: e051d0d324
Change-Id: Id14ad01406da3750d99dfb33856081287a30593f
2020-05-06 16:48:43 +00:00
Artur Satayev
388d39ba9a Introduce min_sdk_version to deps info.
Bug: 149622332
Test: m
Change-Id: Ie6568cb8a82d5cca9a3dc91b5a068abf4b0632dc
Merged-In: Ie6568cb8a82d5cca9a3dc91b5a068abf4b0632dc
Exempt-From-Owner-Approval: cp from aosp
(cherry picked from commit 480e25b74f)
2020-05-06 15:01:14 +00:00
Artur Satayev
c7fb0fc515 [automerger skipped] Merge "Introduce flat deps info list." into rvc-dev am: fb0a636f6d -s ours
am skip reason: Change-Id Ibd521c96b7aeab90b95965c1b524e0a0152aaf5a with SHA-1 a8bd113a69 is in history

Change-Id: I478585c028d89d70efea8989774148bb695f0c92
2020-05-06 13:57:32 +00:00
Artur Satayev
fb0a636f6d Merge "Introduce flat deps info list." into rvc-dev 2020-05-06 13:45:16 +00:00
Paul Duffin
5e308f2e7a [automerger skipped] Improve error messages when output file is invalid am: 2df45faa7b -s ours
am skip reason: Change-Id I01eebaad58c5a6950e4419d0a8bf80bd02fed543 with SHA-1 712993cf0c is in history

Change-Id: Id6951dc9f350e2364ab16d837c012b18c7ff950b
2020-05-06 12:55:12 +00:00
Paul Duffin
fe696942fc [automerger skipped] Document preArch mutators am: 6615b30812 -s ours
am skip reason: Change-Id I4cd6647a8707f49363d297a3b3082ef19ba93868 with SHA-1 aa4162e71e is in history

Change-Id: I1ce91cf9572db53d5596f211f4a271bfdd154893
2020-05-06 12:55:10 +00:00
Martin Stjernholm
7ddebaf30c [automerger skipped] Do not propagate dynamic dependencies for stub libs. am: bb0e839da9 -s ours
am skip reason: Change-Id Ie5ec02aebdf00b75756a6eda40db821488d30065 with SHA-1 cc330d665a is in history

Change-Id: I359cc6130bc7e1bc8131e5d076d4c98c842d2626
2020-05-06 12:55:08 +00:00
Martin Stjernholm
a00b81af5e [automerger skipped] Do not propagate the stub symbol file to prebuilts. am: 13b8b6ac70 -s ours
am skip reason: Change-Id Ic79f89bc6d11d0b6552fa20791f5680ff9a40c0d with SHA-1 bdd0dffc1b is in history

Change-Id: Ia73d03a8f4616162925aa361b908977dd64fd5b4
2020-05-06 12:50:47 +00:00
Martin Stjernholm
64366afcad [automerger skipped] Propagate stubs to the SDK for libraries that have them. am: cd497b0506 -s ours
am skip reason: Change-Id I31b928e6261198b6dd6f6b17196e714f07b64172 with SHA-1 c5dd4f7c1f is in history

Change-Id: If9d3b033f7ad11da3218216d340a6b19d13ecb6c
2020-05-06 12:50:45 +00:00
Martin Stjernholm
5191958dc7 [automerger skipped] Don't run new test on Darwin that lacks snapshot support. am: 8c0db63809 -s ours
am skip reason: Change-Id Ib14af7caa408e252242e6933f7281aab3888789c with SHA-1 66a06945aa is in history

Change-Id: I6b1de78f113a5ab2ba6cf793a6b961f3222e14f7
2020-05-06 12:26:53 +00:00
Martin Stjernholm
6811c6c090 [automerger skipped] Propagate empty vs unspecified system_shared_libs correctly. am: bddfbc463d -s ours
am skip reason: Change-Id If2e8a5296223e6281d833312660e8e9e4cd184c0 with SHA-1 10566a035f is in history

Change-Id: I3bea0b4b02ac5b665524097ca9b24fa3f81e8232
2020-05-06 12:26:50 +00:00
Martin Stjernholm
5e466d6a7d [automerger skipped] Add SDK member support for cc_object. am: fcb99e07fc -s ours
am skip reason: Change-Id I2ab8f6aadb1440b325697cae4a8ed761c62d15d2 with SHA-1 cd07bce437 is in history

Change-Id: Iaad8067a3a26ff2f76db69faa037c24491861bd4
2020-05-06 12:26:46 +00:00
Martin Stjernholm
5b49943b2c [automerger skipped] Add cc_prebuilt_object. am: 39978527ce -s ours
am skip reason: Change-Id I53d58100cc1d410c5cf5b7906de7ed6f7add2035 with SHA-1 0b92ac8e43 is in history

Change-Id: If57cffb7bb109e1169aee1ac7e3ac5258d81d13a
2020-05-06 12:26:42 +00:00
Makoto Onuki
88b9905d74 Merge the "big 3" metalava invocations into one
This CL merges the biggest three metalava invocations --
stub and signature file generation, api lint, and "check released" --
into one call.

For each of the existing separate rules for api lint and check released this change:
1) Stopped creating a separate rule containing its own metalava invocation.
2) Moved the code for creating the rule earlier so it can add extra flags to the combined metalava command.
3) Moved the message handling into metalava, allowing the message to be passed in.
4) Added a flag to record whether the specific check was needed so that you can separate the timestamp file creation out to run after the merged metalava command.

A couple of minor bug fixes and clarifications.

Bug: 151160048
Test:  "m" and treehugger

Test: Apply https://android-review.googlesource.com/c/platform/frameworks/base/+/1295541 and run `NINJA_ARGS="-k 999" m checkapi`
-> Make sure there are 4 kinds of lint failures ("AddedFinal" and "VisiblySynchronized") with the valid error messages, from:
- api-stubs-docs
- system-api-stubs-docs
- test-api-stubs-docs
- module-lib-api-

Test: Run the 4 cp commands shown by lint
-> Make sure the following 4 baseline files are updated:
frameworks/base/api/lint-baseline.txt
frameworks/base/api/module-lib-lint-baseline.txt
frameworks/base/api/system-lint-baseline.txt
frameworks/base/api/test-lint-baseline.txt

Test: Then run `NINJA_ARGS="-k 999" m checkapi` again.
-> Make sure the API lint errors are gone
-> Make sure "api-stubs-docs" shows the "You have tried to change the API from what has been
previously released in ..." error. (because of "AddedFinal")
-> Make sure it the other 3 API surfaces show the "You have tried to change the API from
what has been previously approved" error.

Test: Remove "final" from Intent.java and run "NINJA_ARGS="-k 999" m checkapi" again.
-> This time, all the 4 API surfaces say "You have tried to change the API from
what has been previously approved" error."

Test: Run the 4 "make *-update-current-api" commands shown in the above errors and "NINJA_ARGS="-k 999" m checkapi"
-> The exact command is:
$ make \
  module-lib-api-update-current-api \
  api-stubs-docs-update-current-api \
  test-api-stubs-docs-update-current-api \
  system-api-stubs-docs-update-current-api

-> Make sure frameworks/base/api/*-current.txt are properly updated.

Test: Run "m update-api"
-> Make sure no text signature files get updated.

Test: Run "m droid".
-> Make sure everything builds fine.

Change-Id: Ia1a5510b57d58748b4655473d4585636deb7f45e
Merged-In: Ia1a5510b57d58748b4655473d4585636deb7f45e
2020-05-06 13:00:01 +01:00
Makoto Onuki
194c43f5a7 Merge the "big 3" metalava invocations into one
This CL merges the biggest three metalava invocations --
stub and signature file generation, api lint, and "check released" --
into one call.

For each of the existing separate rules for api lint and check released this change:
1) Stopped creating a separate rule containing its own metalava invocation.
2) Moved the code for creating the rule earlier so it can add extra flags to the combined metalava command.
3) Moved the message handling into metalava, allowing the message to be passed in.
4) Added a flag to record whether the specific check was needed so that you can separate the timestamp file creation out to run after the merged metalava command.

A couple of minor bug fixes and clarifications.

Bug: 151160048
Test:  "m" and treehugger

Test: Apply https://android-review.googlesource.com/c/platform/frameworks/base/+/1295541 and run `NINJA_ARGS="-k 999" m checkapi`
-> Make sure there are 4 kinds of lint failures ("AddedFinal" and "VisiblySynchronized") with the valid error messages, from:
- api-stubs-docs
- system-api-stubs-docs
- test-api-stubs-docs
- module-lib-api-

Test: Run the 4 cp commands shown by lint
-> Make sure the following 4 baseline files are updated:
frameworks/base/api/lint-baseline.txt
frameworks/base/api/module-lib-lint-baseline.txt
frameworks/base/api/system-lint-baseline.txt
frameworks/base/api/test-lint-baseline.txt

Test: Then run `NINJA_ARGS="-k 999" m checkapi` again.
-> Make sure the API lint errors are gone
-> Make sure "api-stubs-docs" shows the "You have tried to change the API from what has been
previously released in ..." error. (because of "AddedFinal")
-> Make sure it the other 3 API surfaces show the "You have tried to change the API from
what has been previously approved" error.

Test: Remove "final" from Intent.java and run "NINJA_ARGS="-k 999" m checkapi" again.
-> This time, all the 4 API surfaces say "You have tried to change the API from
what has been previously approved" error."

Test: Run the 4 "make *-update-current-api" commands shown in the above errors and "NINJA_ARGS="-k 999" m checkapi"
-> The exact command is:
$ make \
  module-lib-api-update-current-api \
  api-stubs-docs-update-current-api \
  test-api-stubs-docs-update-current-api \
  system-api-stubs-docs-update-current-api

-> Make sure frameworks/base/api/*-current.txt are properly updated.

Test: Run "m update-api"
-> Make sure no text signature files get updated.

Test: Run "m droid".
-> Make sure everything builds fine.

Change-Id: Ia1a5510b57d58748b4655473d4585636deb7f45e
2020-05-06 12:03:18 +01:00
Yo Chiang
29555d5f33 APEX should require base module of stub libraries
Bug: 155841765
Bug: 7456955
Test: m nothing and check the content of out/soong/Android-*.mk
Change-Id: I1f109c27a5e9bcfeb3a887b2e8d6a2cf983aa730
2020-05-06 09:18:01 +00:00
Paul Duffin
2df45faa7b Improve error messages when output file is invalid
Bug: 155720025
Test: m nothing
Merged-In: I01eebaad58c5a6950e4419d0a8bf80bd02fed543
Change-Id: I01eebaad58c5a6950e4419d0a8bf80bd02fed543
(cherry picked from commit 712993cf0c)
2020-05-06 08:21:22 +01:00
Paul Duffin
6615b30812 Document preArch mutators
Bug: 155295806
Test: m checkbuild
Merged-In: I4cd6647a8707f49363d297a3b3082ef19ba93868
Change-Id: I4cd6647a8707f49363d297a3b3082ef19ba93868
(cherry picked from commit aa4162e71e)
2020-05-06 08:20:34 +01:00
Martin Stjernholm
bb0e839da9 Do not propagate dynamic dependencies for stub libs.
Test: m nothing
Test: Build an SDK snapshot including libc, check that the generated
  cc_prebuilt_library_shared for it is a stub that doesn't depend on
  ld-android.
Bug: 152255951
Bug: 154310674
Merged-In: Ie5ec02aebdf00b75756a6eda40db821488d30065
Change-Id: Ie5ec02aebdf00b75756a6eda40db821488d30065
(cherry picked from commit cc330d665a)
2020-05-06 08:19:07 +01:00
Martin Stjernholm
13b8b6ac70 Do not propagate the stub symbol file to prebuilts.
This partially reverts https://r.android.com/1278193. The propagated
symbol files contain all versions, even though only one is applicable
in a given SDK snapshot.

It's uncertain what repercussions this might have, but one is that if
we were to update a snapshot for a fixed version then it might change
because the symbol file contains new versions that aren't applicable.
Since the symbol file isn't actually needed at this point it's better
to wait with this step until the use cases for it are more clear.

Test: m nothing
Test: Create an SDK snapshot with Bionic libs, drop it into a
  master-art tree without bionic/ in it, build ART APEXes, and check
  that the Soong phase completes (specifically that the stubs are
  detected even without symbol files).
Bug: 152481980
Merged-In: Ic79f89bc6d11d0b6552fa20791f5680ff9a40c0d
Change-Id: Ic79f89bc6d11d0b6552fa20791f5680ff9a40c0d
(cherry picked from commit bdd0dffc1b)
2020-05-06 08:18:49 +01:00
Martin Stjernholm
cd497b0506 Propagate stubs to the SDK for libraries that have them.
Necessary to make the APEX build logic treat the libraries as API
boundaries rather than dependencies to bundle.

The .so files in the snapshots are the compiled stub libraries in this
case. They are strictly speaking redundant since they can be generated
from the .map.txt files in the snapshots, but doing that would require
extending the cc_prebuilt_library(_shared) module types with a full
compiler pass etc, and that would break a lot of assumptions in the cc
package.

Test: m nothing
Test: Create an SDK snapshot with Bionic libs, drop it into a
  master-art tree without bionic/ in it, build ART APEXes, and check
  that the Soong phase completes (specifically no errors about various
  APEX libs requiring libc that is not available to them).
Bug: 152481980
Merged-In: I31b928e6261198b6dd6f6b17196e714f07b64172
Change-Id: I31b928e6261198b6dd6f6b17196e714f07b64172
(cherry picked from commit c5dd4f7c1f)
2020-05-06 08:18:35 +01:00
Martin Stjernholm
8c0db63809 Don't run new test on Darwin that lacks snapshot support.
Test: m nothing
Bug: 152514829
Bug: 152255951
Merged-In: Ib14af7caa408e252242e6933f7281aab3888789c
Change-Id: Ib14af7caa408e252242e6933f7281aab3888789c
(cherry picked from commit 66a06945aa)
2020-05-06 08:18:15 +01:00
Martin Stjernholm
bddfbc463d Propagate empty vs unspecified system_shared_libs correctly.
Necessary to get correct prebuilts for many Bionic libs.

Cleaned up numerious "system_shared_libs: []" from test fixtures, since
they otherwise would need correction in the expected results, and it is
better to have a single test focused on testing system_shared_libs
propagation.

Test: m nothing
Bug: 152255951
Merged-In: If2e8a5296223e6281d833312660e8e9e4cd184c0
Change-Id: If2e8a5296223e6281d833312660e8e9e4cd184c0
(cherry picked from commit 10566a035f)
2020-05-06 08:17:57 +01:00
Martin Stjernholm
fcb99e07fc Add SDK member support for cc_object.
Test: m nothing
Test: Add
    sdk {
        name: "runtime-module-sdk",
        native_shared_libs: [
            "libc",
            "libdl",
            "libm",
            "ld-android",
        ],
        native_objects: [
            "crtbegin_dynamic",
            "crtbegin_static",
            "crtend_android",
        ],
    }
  to bionic/apex/Android.bp. Then:
    build/soong/scripts/build-aml-prebuilts.sh runtime-module-sdk
  Take the generated runtime-module-sdk-current.zip and unzip into a
  master-art tree without bionic/, edit the generated Android.bp to
  extend cc_prebuilt_* modules with:
    nocrt: true,
    stl: "none",
    system_shared_libs: [],
    apex_available: ["//apex_available:anyapex"],
    recovery_available: true,
    vendor_available: true,
    ramdisk_available: true,
  Then "m com.android.art.debug". This passes Soong but fails in the
  build step because more members are required.
Bug: 148934017
Merged-In: I2ab8f6aadb1440b325697cae4a8ed761c62d15d2
Change-Id: I2ab8f6aadb1440b325697cae4a8ed761c62d15d2
(cherry picked from commit cd07bce437)
2020-05-06 08:17:10 +01:00
Martin Stjernholm
39978527ce Add cc_prebuilt_object.
To be used for prebuilt object support in SDK snapshots.

Test: m nothing
Bug: 148934017
Merged-In: I53d58100cc1d410c5cf5b7906de7ed6f7add2035
Change-Id: I53d58100cc1d410c5cf5b7906de7ed6f7add2035
(cherry picked from commit 0b92ac8e43)
2020-05-06 08:16:53 +01:00
Jeongik Cha
255a570e6d Remove networkstack-aidl-interfaces-unstable-java from the whitelist
networkstack-aidl-interfaces-*java has explicit apex_available now.
Accordingly, remove it from the whitelist

Bug: 133526962
Test: m nothing
Change-Id: If5427afb2470a7dffbd418e1c405af508577ad93
2020-05-06 05:20:13 +00:00
Kris Alder
e051d0d324 add researcher_submitted field to cc_fuzz
Bug: 155105113
Test: make haiku
Change-Id: If6a3f2c7af9ebb41327e3695c850f962adb4122c
2020-05-06 03:25:54 +00:00
Treehugger Robot
f1d26b7d78 Merge "Simplify package by using LoadHook instead of mutators" am: 00789cc58b am: c11d79fe52
Change-Id: I6e6a45b00b8f3cbc8967d2474958ae555adf8dc1
2020-05-06 02:53:57 +00:00
Treehugger Robot
c11d79fe52 Merge "Simplify package by using LoadHook instead of mutators" am: 00789cc58b
Change-Id: I897cbf1ab00fbb37b9545ffb9395e55b8e137482
2020-05-06 02:43:36 +00:00
Treehugger Robot
00789cc58b Merge "Simplify package by using LoadHook instead of mutators" 2020-05-06 02:28:38 +00:00
Ramy Medhat
7aee9d536d Merge "Add support for the remote execution of metalava actions." am: a1ffd53fe4 am: aacf301e75
Change-Id: I0457d9fd9a931a3b5c0f78b2565feaef60f686ec
2020-05-05 22:16:03 +00:00