Commit Graph

2145 Commits

Author SHA1 Message Date
Martin Stjernholm ae15fe4e2b Merge "Allow dependencies from platform variants to APEX modules (reland)." am: 313a349d6b am: bb4aa7c1c1 am: da18e6832b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1664028

Change-Id: I9e836e76724a9d8b20970bc77159eca1f45b7e81
2021-04-06 18:24:59 +00:00
Martin Stjernholm ec00900f83 Allow dependencies from platform variants to APEX modules (reland).
When `test_for` dependencies are added from libraries to APEX modules,
they can be created from the platform variants of the libraries, since
those are used for building tests. Hence we need an alias from the
platform variant of the APEX module to have a target for those
dependencies.

This is only necessary for libraries that are split by the APEX
mutator, i.e. is a member of some APEX. Normally that's not the case
for test libraries, but there may be exceptions (read
com.android.art.testing).

This relands https://r.android.com/1654679 after decoupling it from the
topic that caused b/184239856.

Test: m nothing
Bug: 183882457
Change-Id: If643c75ce9bc25fa01ad9d1e3ba8e1d060d03bb2
2021-04-06 14:24:26 +01:00
Treehugger Robot dd62393313 Merge changes Id33bf640,I4d67b9b9 am: 8c56183fb7 am: b17e061ae9 am: a7fe23c458
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1663139

Change-Id: Ic1434fc150e802f3a6e8b58a9a6f3e16e93da146
2021-04-06 05:29:49 +00:00
Jiyong Park f58c46e36f Don't use incorrect version names like VER or BOARD even in tests
All version names will go through ApiLevelFromUser which triggers an
error when the name is not a valid one.

Bug: 175678607
Test: m
Change-Id: Id33bf64085603914d45ad7942cb8908a4734493f
2021-04-05 09:32:06 +09:00
Jiyong Park 7f61ac4c8b Merge "Move java.sdkSpec to the android package" am: d4fa8fc107 am: 7ff95eca2f am: f19d2d57b3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1655587

Change-Id: I5c5d25a78c4f51876289dc450874d83c5a9c90b6
2021-04-03 13:16:03 +00:00
Jiyong Park f1691d2a2c Move java.sdkSpec to the android package
... in preparation for making the handling of sdk versions consistent
across java and cc modules.

Bug: 175678607
Test: m
Change-Id: I598f0454bce9b7320621022115412fbe97403945
2021-04-03 08:25:12 +09:00
Jaewoong Jung 89624d7866 Merge "Revert "Revert "Add min_sdk_version to java_import.""" am: d0afefa4b1 am: f7c8d8a746 am: 4377971d03
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1663082

Change-Id: I8090eb98d2f3eeb6be4413bfb774f6f30c66787b
2021-04-02 17:37:37 +00:00
Jaewoong Jung d0afefa4b1 Merge "Revert "Revert "Add min_sdk_version to java_import.""" 2021-04-02 15:49:58 +00:00
Jaewoong Jung 56e12dbbaf Revert "Revert "Add min_sdk_version to java_import.""
This reverts commit 5ab6508008.

Reason for revert: Resubmitting Ie255f74d40432f4bdd0092d618705a7d17235e58 after fixing the broken targets.

Bug: 183695497
Test: https://android-build.googleplex.com/builds/forrest/run/L58600000849810513
Change-Id: I5f072f396002ca3a45bd530ad9be987efa732833
2021-04-02 04:55:27 +00:00
Jaewoong Jung a8eae7b113 Merge "Revert "Add min_sdk_version to java_import."" am: 37a5d5ebd8 am: 7644361eef am: e790b69343
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1663080

Change-Id: I8182c3f6caf58c0e96fc81b624ba974df68cc5bf
2021-04-02 02:40:39 +00:00
Jaewoong Jung 37a5d5ebd8 Merge "Revert "Add min_sdk_version to java_import."" 2021-04-02 00:34:06 +00:00
Jaewoong Jung 5ab6508008 Revert "Add min_sdk_version to java_import."
This reverts commit 6d15d63556.

Reason for revert: Broke git_sc-mainline-prod on test_suites_x86_64

Fixes: 184305592
Change-Id: I4b2e2675e0dd9e2e84966f545a52f45d5b731bab
2021-04-02 00:17:59 +00:00
Jaewoong Jung 2745317d74 Merge "Add min_sdk_version to java_import." am: 51a0d85ebc am: e37f90021f am: f88946c3ac
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1660819

Change-Id: I81345ab4dd0efcc584d978db290361558fc6477c
2021-04-01 21:39:08 +00:00
Jaewoong Jung 51a0d85ebc Merge "Add min_sdk_version to java_import." 2021-04-01 19:45:53 +00:00
Nikita Ioffe eac680eeb4 Merge "Revert "Allow dependencies from platform variants to APEX modules."" am: 6f77314381 am: 72d1c2f38e am: e7e0954fea
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1660243

Change-Id: Ibfd60afe26a0b931803c9b84f8805b5ebc54483b
2021-04-01 16:28:59 +00:00
Nikita Ioffe 6f77314381 Merge "Revert "Allow dependencies from platform variants to APEX modules."" 2021-04-01 14:22:53 +00:00
Paul Duffin 27b254ba08 Merge "Remove apexFixtureFactory" am: abc89cf86b am: 4ec4ca02bd am: 8f1c917639
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1660142

Change-Id: I7ec3da4998f64a17b5512a507e833ff2da1ccff8
2021-04-01 11:37:38 +00:00
Nikita Ioffe d64139f8e5 Revert "Allow dependencies from platform variants to APEX modules."
Revert submission 1658000

Reason for revert: Breaks full-eng build: b/184239856
Reverted Changes:
I4f8ead785:Avoid internal APEX stubs for libsigchain and clea...
I68affdf69:Allow dependencies from platform variants to APEX ...
I54b33784e:Rename libdexfile_external_static to libdexfile_st...
Id68ae9438:libdexfile_external is being replaced by libdexfil...
I12ac84eb4:libdexfile_external is replaced by libdexfile.
If05dbffc8:Rename libdexfile_external_static to libdexfile_st...
Ia011fa3a8:Merge libdexfile_external into libdexfile.

Change-Id: If494dc5385042a4620a76a9eadc1613ae0eb1655
2021-04-01 10:58:24 +00:00
Paul Duffin 284165afb5 Remove apexFixtureFactory
Bug: 182885307
Test: m nothing
Change-Id: I88c58bf6b4adda4017e54548748897c51c3f3aa1
2021-04-01 10:31:07 +01:00
Martin Stjernholm c5bc333cf5 Merge "Allow dependencies from platform variants to APEX modules." am: f8c9713fb8 am: 3311c129d4 am: 2e9cf54e07
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1654679

Change-Id: I5a00f0bdcd9cb53e6e8c1f0b7bf21eab7fab3dbf
2021-04-01 09:05:44 +00:00
Treehugger Robot 7349652925 Merge ""current" is implicitly added to stubs.versions" am: 25c47a43a5 am: 4ce23de995 am: cab9b4b25c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1641782

Change-Id: Ibc0b6e3fdd98b59900f9998f5c11c417d5d4a20a
2021-04-01 06:57:10 +00:00
Martin Stjernholm f8c9713fb8 Merge "Allow dependencies from platform variants to APEX modules." 2021-04-01 06:53:13 +00:00
Treehugger Robot 25c47a43a5 Merge ""current" is implicitly added to stubs.versions" 2021-04-01 04:53:55 +00:00
Jiyong Park d4a3a137ed "current" is implicitly added to stubs.versions
So far, when a library `libfoo` has `stubs.versions: ["10", "11"]`, then
`shared_libs: ["libfoo"]` is linked to the version 11 of the stub.

This requires the author of `libfoo` to manually update the property
whenever a new version is introduced. Otherwise, clients are not able
to use the newly added APIs because the latest stub is for an old
version.

This change eliminates the need for manual updating. "current" version
is always implicitly added to `stubs.versions`. It is added even when
nothing is set on the property, if `stubs.symbol_file` is set. i.e.

```
cc_library {
    name: "libfoo",
    stubs: {
        symbol_file: "libfoo.map.txt",
	// no versions: [...] needed
    },
}

cc_library {
    name: "a_client",
    shared_libs: ["libfoo"],
    apex_available: ["myapex"],
    min_sdk_version: "29",
}

apex {
    name: "myapex",
    native_shared_libraries: ["a_client"],
    min_sdk_version: "29",
}
```

`a_client` links to the "current" stub of `libfoo` that has all symbols
shown in the map file.

Note that, above doesn't mean that the client has unlimited access to
APIs that are introduced even after the min_sdk_version of the client
(29 in this example). The use of such APIs still has to be guarded with
`__builtin_available` check.

Bug: N/A
Test: m
Change-Id: I70bb1600c18e74d36c6b24c3569d2149f02aaf96
2021-04-01 09:58:53 +09:00
Paul Duffin c0e22ebaef Merge "Convert testDexpreoptWithApexes to use test fixtures" am: bcaf0fcb55 am: 7eee85fcae am: 0d9785622c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1658076

Change-Id: If889ada1f5b1b572c04a4166c7c17332cf1f894c
2021-04-01 00:10:51 +00:00
Paul Duffin c31fe63706 Merge "Convert TestApexPermittedPackagesRules to use test fixtures" am: b00c7ed2e8 am: 6f3f57cbd8 am: 7904ca6ceb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1658075

Change-Id: Ic911814f474cf7ec8d249af4b251bd4a82f9a6f6
2021-04-01 00:10:42 +00:00
Jaewoong Jung 6d15d63556 Add min_sdk_version to java_import.
Fixes: 183695497
Test: apex_test.go
Change-Id: Ie255f74d40432f4bdd0092d618705a7d17235e58
2021-03-31 16:50:42 -07:00
Paul Duffin 5560712323 Convert testDexpreoptWithApexes to use test fixtures
Bug: 181070625
Test: m nothing
Change-Id: Id40064c539c1d4eeb39396f0881a97529f3a3452
2021-03-31 16:16:20 +01:00
Paul Duffin 45338f05e3 Convert TestApexPermittedPackagesRules to use test fixtures
Adds PrepareForTestWithNeverallowRules to make it easy to test
neverallow rules. Avoid exporting any unnecessary neverallow related
methods from the android package.

Bug: 181070625
Test: m nothing
Change-Id: Idfc6955cb23f1a4d1790be7879388154b03f3980
2021-03-31 16:16:18 +01:00
Paul Duffin 4b2ff1652c Merge "Rename OptionalPath.RelativeToPath -> RelativeToTop" am: 32eccae1ac am: 4ac8cd6582 am: d188fa7de2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1658072

Change-Id: I1ad2710e2439861542f01a976b185bb4084b02dd
2021-03-31 10:45:46 +00:00
Paul Duffin 49e0d8b637 Merge "Remove extraneous calls to TestingBuildParams.RelativeToTop()" am: dff50dffbc am: c9ec211cca am: 31638bfb46
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1655209

Change-Id: I8cac59260ab0d3f5c4ffe4cb6629c76105cf50ca
2021-03-31 00:21:41 +00:00
Paul Duffin b4c0f11cb7 Automatically call TestingBuildParams.RelativeToTop() am: e8366da1f6 am: fe53b7a2df am: 53325362e9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1655208

Change-Id: I2260f4020c4631310626f77ec7480f106e4c7c3b
2021-03-30 23:14:01 +00:00
Paul Duffin afdd4061ee Rename OptionalPath.RelativeToPath -> RelativeToTop
Bug: 183650682
Test: m nothing
Change-Id: I95239c2273e715e8c4c15a4a02967e01f6913234
2021-03-30 20:06:22 +01:00
Paul Duffin a71a67a4f5 Remove extraneous calls to TestingBuildParams.RelativeToTop()
Deprecated the method to try and prevent any other uses being added.

Bug: 183650682
Test: m nothing
Change-Id: Ia6f43851e5a00c9d96af780e3bd21e03175e1a2f
2021-03-30 20:03:22 +01:00
Paul Duffin e8366da1f6 Automatically call TestingBuildParams.RelativeToTop()
Fixes the few tests that break due to this and which cannot easily be
separated into their own changes.

Bug: 183650682
Test: m nothing
Change-Id: Ia2f31213a1f114a78e66a81d89279ecde9f4c465
2021-03-30 19:35:35 +01:00
Paul Duffin b19122a9f6 Merge "Add the transitive dependencies of boot_image to apex" am: 58367574a5 am: 023bd16632 am: 9b7d7f45f0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1652623

Change-Id: Id3cc4bc9ecaaa4ae789e7d79ebce575f9760bdda
2021-03-30 18:32:11 +00:00
Paul Duffin 3c26d90d66 Merge "Stop JavaSdkLibrary_... tests requiring absolute path" am: da0470d8c7 am: 9542ba405f am: c9e51d0f74
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1654683

Change-Id: I5c5fc95ac48eb887223c5ebee85330b72a261348
2021-03-30 18:32:05 +00:00
Paul Duffin 03802c1edc Merge "Remove buildDir from apex package" am: a33da07343 am: 4ecf1ee4c5 am: d26d5bc45b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1654682

Change-Id: Ia7c2f88892ac2fad12b83fb641655fbee571e404
2021-03-30 18:32:00 +00:00
Paul Duffin a230ea4687 Merge "Add contents property to boot_image (and prebuilt_boot_image)" am: 8d3c44a986 am: b8f0b4e1bf am: af5736ea92
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1652622

Change-Id: Idb92c709d8bf17e3e00905ea54b9ee2bc901bbac
2021-03-30 18:31:51 +00:00
Paul Duffin 58367574a5 Merge "Add the transitive dependencies of boot_image to apex" 2021-03-30 16:42:07 +00:00
Paul Duffin da0470d8c7 Merge "Stop JavaSdkLibrary_... tests requiring absolute path" 2021-03-30 16:35:23 +00:00
Paul Duffin a33da07343 Merge "Remove buildDir from apex package" 2021-03-30 16:30:10 +00:00
Paul Duffin 8d3c44a986 Merge "Add contents property to boot_image (and prebuilt_boot_image)" 2021-03-30 16:26:20 +00:00
Martin Stjernholm 2f1e93ef36 Merge changes Iaa6411b5,I2118b8a2,Ibbdd3cbd,I2d1bbda2 am: 38e9f0b82f am: 99f29d244a am: c5c5d80d30
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1652620

Change-Id: I09a93351bcae2c27531fd258ddacdd8bc5ddd474
2021-03-30 12:42:38 +00:00
Martin Stjernholm 4d058c8809 Allow dependencies from platform variants to APEX modules.
When `test_for` dependencies are added from libraries to APEX modules,
they can be created from the platform variants of the libraries, since
those are used for building tests. Hence we need an alias from the
platform variant of the APEX module to have a target for those
dependencies.

This is only necessary for libraries that are split by the APEX
mutator, i.e. is a member of some APEX. Normally that's not the case
for test libraries, but there may be exceptions (read
com.android.art.testing).

Test: m nothing
Bug: 183882457
Change-Id: I68affdf69d7ec05c0ee8730e8ec04d7cb9e0e44a
2021-03-30 12:43:45 +01:00
Martin Stjernholm 38e9f0b82f Merge changes Iaa6411b5,I2118b8a2,Ibbdd3cbd,I2d1bbda2
* changes:
  Make test_for arch variant.
  Don't use APEX stubs between internal libs in the same APEX when building test_for modules.
  Add FilterListPred.
  Don't panic on "go test" invocations from the command line.
2021-03-30 09:26:36 +00:00
Paul Duffin c434921028 Merge "Add dependencies for art boot_image" am: 16e6aeeb51 am: d019752f73 am: 78dd45f054
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1652451

Change-Id: If37ae085694aa93924dce1548fad89b05fdfd8b0
2021-03-29 22:07:06 +00:00
Paul Duffin cf8d7db02b Stop JavaSdkLibrary_... tests requiring absolute path
Bug: 183650682
Test: m nothing
Change-Id: Ia6e5034bbf3920a9e1f8fc319dc722658f6cb1ce
2021-03-29 17:29:30 +01:00
Paul Duffin 37ba344e40 Remove buildDir from apex package
Bug: 182885307
Test: m nothing
Change-Id: I71cbfd79e2fb4b1cbd2914ffab76570548d57c61
2021-03-29 17:29:30 +01:00
Paul Duffin 4d101b60f0 Add the transitive dependencies of boot_image to apex
This avoids having to specify boot libraries in both the boot_image
and separately as java_libs on the apex. Simply add them to the
boot_image (happens automatically ATM when using image_name: "art")
and add the boot_image to the apex.

Bug: 177892522
Test: m nothing
Change-Id: I7e0c41665604b73780cdf0dc555067497b1e6ef0
2021-03-29 17:15:29 +01:00