Commit Graph

34503 Commits

Author SHA1 Message Date
Ulyana Trafimovich 5da4dcf21a Merge "Add `provides_uses_library` example to TestUsesLibrary check." am: 71284b60ae
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1609476

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I13bcf86177003e68dcc567ec118e28c1982384a2
2021-03-02 22:29:23 +00:00
Ulyana Trafimovich 45e3b00b56 Merge "Stricten TestUsesLibrary check." am: 00c27b7a68
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1609474

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I44f751341142834cb89503ec263d1c20ad15ce29
2021-03-02 22:28:44 +00:00
Paul Duffin 0630dacc0c Merge "Remove deapexer and prebuilt apex select mutators" am: 4b786d2da1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1610795

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia285f625de493e02e8b2f0ea5aa6a245927bc581
2021-03-02 22:27:27 +00:00
Paul Duffin 196fe7325a Merge "Verify the prebuilt_apex selects the correct input apex file" am: 9b41efabd1 am: b267e12670
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1610797

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iaa64f22f2afa5172702482999c3b861aec0d39ff
2021-03-02 21:50:49 +00:00
Paul Duffin 906fb68c12 Merge "Add test to verify the deapexer rule's input apex file" am: 30c9fe93e0 am: 6f342644d0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1610796

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I65700e9f3b7e1d87bf8a755b249bf176417ddcd9
2021-03-02 21:50:08 +00:00
Paul Duffin b267e12670 Merge "Verify the prebuilt_apex selects the correct input apex file" am: 9b41efabd1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1610797

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I422ccc35977e0be846bb7a3497a50c2fc2c42e92
2021-03-02 21:36:01 +00:00
Paul Duffin 6f342644d0 Merge "Add test to verify the deapexer rule's input apex file" am: 30c9fe93e0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1610796

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ibb6beaaa979cb14cf005a9bed7fd851253f91115
2021-03-02 21:26:58 +00:00
Lukács T. Berki 1716791150 Merge "Move environment staleness check to soong_ui." am: b821b9b852 am: b6593f138a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1606677

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I922490015ae619e9836b06adc0e8cbee8337fe4a
2021-03-02 20:39:55 +00:00
Colin Cross 6cb1128b54 Disable TestSendLog on the buildbots
TestSendLog sometimes hangs on the buildbot, although it has never
been reproduced locally.  The cause appears to be a unix domain
packet that was sent but never received.  Skip the test in short
mode for now, which will leave it manually runnable but not run
it as part of the build.

Fixes: 120596545
Test: m nothing
Change-Id: I3e6bc9b5f1d9c15dc9a7294d98cbd917d0637c44
2021-03-02 12:26:14 -08:00
Colin Cross 2807f0047b Remove global state from VNDK apexes
Use the name of the apex instead of a global map to find the right
VNDK apex for each VNDK version.

Bug: 181689854
Test: apex tests
Change-Id: If9f8fb10d09e125c9e7d44228e1aa746bf53c082
2021-03-02 12:23:16 -08:00
Treehugger Robot 636d152e08 Merge "Remove Abseil checks from clang-tidy defaults." 2021-03-02 20:22:14 +00:00
Paul Duffin cfd3374da0 Add error handling to test fixtures
Adds support for customizing the error handling behavior of test
fixtures and converts a test to use it.

Bug: 181070625
Test: m nothing
Change-Id: I736c41311819d57d8688fc3b0e021dbb50c491c1
2021-03-02 20:17:19 +00:00
Lukács T. Berki b6593f138a Merge "Move environment staleness check to soong_ui." am: b821b9b852
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1606677

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I967e74f6ab0c05308455b658fd00574642acf8de
2021-03-02 20:09:17 +00:00
Martin Stjernholm cbe5663663 Merge "Recognise the Google-signed ART APEXes as well." am: cfcaddc5b2 am: b85c77714a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1590194

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ifa8f29e7a513ca4ee28b08727b496ead452b9e40
2021-03-02 19:49:59 +00:00
Martin Stjernholm b85c77714a Merge "Recognise the Google-signed ART APEXes as well." am: cfcaddc5b2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1590194

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I81c3363b5d207c7eee5955a01d1bddeb9a8e3704
2021-03-02 19:04:35 +00:00
Hyundo Moon 4416350471 Add modules-annotation-minsdk in allowed_deps
This enables using @MinSdk in media APEX.

Bug: 181649697
Test: Builds successfully
Change-Id: If69d0a6e84e31d26484c7e29dfdde4f14410a024
2021-03-02 17:22:34 +00:00
Christopher Parsons bc39e17a1d Merge "Support cc_object modules in mixed builds" 2021-03-02 16:44:56 +00:00
Ulyana Trafimovich 8838dce471 Merge "Use compiler filter "verify" for dexpreopt w/o class loader context." 2021-03-02 14:11:58 +00:00
Ulyana Trafimovich 97df5e65b0 Merge "Do verify_uses_libraries check for APKs after patching library names." 2021-03-02 13:49:34 +00:00
Ulyana Trafimovich ae5cdfffa3 Merge "Respect `provides_uses_lib` for modules added via `[optional_]uses_libs`" 2021-03-02 13:47:03 +00:00
Ulyana Trafimovich 71284b60ae Merge "Add `provides_uses_library` example to TestUsesLibrary check." 2021-03-02 13:46:49 +00:00
Ulyana Trafimovich 00c27b7a68 Merge "Stricten TestUsesLibrary check." 2021-03-02 13:46:19 +00:00
Ulya Trafimovich 4a13acb07d Use compiler filter "verify" for dexpreopt w/o class loader context.
In cases when class loader context cannot be computed at build time and
verify_uses_libraries check is relaxed (RELAX_USES_LIBRARY_CHECK=true)
dexpreopt uses a special compiler filter that suppresses AOT-compilation
to native code and applies only those optimizations that do not require
class loader context. Previously the "extract" filter was used. Now ART
supports using "verify" filter in this configuration.

Bug: 132357300
Test: lunch cf_x86_64_phone-userdebug && m && launch_cvd \
      adb wait-for-device && adb root && adb logcat \
      | grep -E 'ClassLoaderContext [a-z ]+ mismatch'
      # empty grep output, no errors
Change-Id: Id4933aa94ea96894278355283383c16d103e98c9
2021-03-02 12:32:23 +00:00
Paul Duffin 4b786d2da1 Merge "Remove deapexer and prebuilt apex select mutators" 2021-03-02 10:48:29 +00:00
Paul Duffin 9b41efabd1 Merge "Verify the prebuilt_apex selects the correct input apex file" 2021-03-02 10:47:48 +00:00
Paul Duffin 30c9fe93e0 Merge "Add test to verify the deapexer rule's input apex file" 2021-03-02 10:47:33 +00:00
Lukács T. Berki b821b9b852 Merge "Move environment staleness check to soong_ui." 2021-03-02 09:44:18 +00:00
Lukacs T. Berki 3243aa51eb Move environment staleness check to soong_ui.
Also delete the now-unnecessary soong_env binary.

Test: Manually. Also checked what happens when a used environment
variable changes.

Change-Id: Ib393e7f444e94819198c6cce4bcd8719d9fd9441
2021-03-02 09:32:49 +01:00
Martin Stjernholm cfcaddc5b2 Merge "Recognise the Google-signed ART APEXes as well." 2021-03-02 08:14:55 +00:00
Treehugger Robot 803eece603 Merge "APEX uses the latest version of the stub" am: ce80f18749 am: 3310e2d9ea
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1609533

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0378b9870949effb36b58bd709626ee0f821f5c2
2021-03-02 02:22:46 +00:00
Treehugger Robot 3310e2d9ea Merge "APEX uses the latest version of the stub" am: ce80f18749
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1609533

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I294103da51c7a9ad11a81e3eadb1a0e2e98920e8
2021-03-02 02:03:34 +00:00
Treehugger Robot ce80f18749 Merge "APEX uses the latest version of the stub" 2021-03-02 01:02:18 +00:00
Chris Parsons 8d6e433c1e Support cc_object modules in mixed builds
Test: With a handwritten conversion of crtbegin_so1, USE_BAZEL_ANALYSIS=1 m crtbegin_so1
Change-Id: I7c777d7f46b37aa1827cc04205e2014f9293bf35
2021-03-01 18:22:34 -05:00
Martin Stjernholm db5138230d Recognise the Google-signed ART APEXes as well.
Test: `m nothing` in internal tree
Bug: 180325915
Change-Id: I83eb660ad7cb480fba2a7874ee7e7f9d35646871
2021-03-01 22:33:51 +00:00
Krzysztof Kosiński a3014f1c13 Remove Abseil checks from clang-tidy defaults.
Abseil is not available in Android, so these checks are not
actionable.

Test: Compiled frameworks/av, no more spurious warnings.
Change-Id: Ic573a3234a99b0fa1f63449e8d020a17a43a134c
2021-03-01 13:25:03 -08:00
Paul Duffin df806bcfca Merge "Avoid hiddenapi ignoring prebuilt with missing dex implementation jar" am: c572b5bf62 am: 551d57c064
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1609479

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I40d9a8d2ee00277bd1790bb80a8237020f3643ba
2021-03-01 20:10:01 +00:00
Paul Duffin 08515806b9 Merge "Allow java_sdk_library_import to contribute to hiddenapi processing" am: 69804ac388 am: 764a15f4e5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1609478

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia22b20976de4b81e4e97026ceae4213309a28b5e
2021-03-01 20:09:21 +00:00
Paul Duffin 86d8214509 Merge "Retrieve dex implementation jars from apex for java_sdk_library_import" am: 0a8d5248ef am: b1426419ec
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1609477

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0dc9e98b69c22ceb22d109ee412f59d3fb5e4819
2021-03-01 20:08:56 +00:00
Paul Duffin 551d57c064 Merge "Avoid hiddenapi ignoring prebuilt with missing dex implementation jar" am: c572b5bf62
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1609479

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I09d8327960fa22bf6b61b59f790dc0fd50154a17
2021-03-01 19:31:32 +00:00
Paul Duffin 764a15f4e5 Merge "Allow java_sdk_library_import to contribute to hiddenapi processing" am: 69804ac388
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1609478

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9c06fde9d8d3f34ec60bea58bfa39f5dc98a66bd
2021-03-01 19:31:06 +00:00
Paul Duffin b1426419ec Merge "Retrieve dex implementation jars from apex for java_sdk_library_import" am: 0a8d5248ef
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1609477

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia9e4f4591c7fc3ee8ab303635a71ac84b1a99327
2021-03-01 19:30:32 +00:00
Ulya Trafimovich fe927a265e Do verify_uses_libraries check for APKs after patching library names.
Some of the `uses_libs`/`optional_uses_libs` libraries may have a
library name that is different from the module name. In that case it is
necessary to patch these properties after `provides_uses_lib` for the
library is applied.

Bug: 132357300
Test: m nothing
Change-Id: I2e2248053787557f955a6b363c22e3bad0301ec7
2021-03-01 17:50:16 +00:00
Ulya Trafimovich eea486a580 Respect `provides_uses_lib` for modules added via `[optional_]uses_libs`
Previously `provides_uses_lib` property affected only those
<uses-library> dependencies that are automatically deduced by Soong as
implicit Java SDK libraries reachable from the `libs` property. Other
<uses-library> dependencies that are explicitly added in `uses_libs` and
`optional_uses_libs` properties ignored `provides_uses_lib`.

As TestUsesLibraries shows (see the TODOs), Soong behaviour is still
incorrect in two ways (to be addressed in follow-up CLs):

- `uses_libs`/`optional_uses_libs` are passed to manifest_fixer
- verify_uses_libraries check is based on `uses_libs`/
  `optional_uses_libs`, and not on the CLC as it should be

Bug: 132357300
Test: m nothing
Change-Id: I0ec7aab9dcd44554d1a79ddd382491c562266fa3
2021-03-01 17:31:23 +00:00
Paul Duffin c04fb9e6a2 Remove deapexer and prebuilt apex select mutators
Originally, when the prebuilt_apex was first created, it selected the
source to use in its DepsMutator. It did that because that was a
convenient place for it to perform that work which had to be:
* After the arch mutator had run so MultiTargets() was available.
* Before the prebuilt_select mutator runs as that relied on the Source
  property to have been set.

Change 064b70c9 then duplicated the call from the DepsMutator of the
deapexer module type that was added as part of the work to make dex
files available for hiddenapi processing.

Change 356f7d45 moved it out of the the DepsMutator methods into its
their own mutators, presumably because it interfered with the
Soong -> Bazel conversion work.

This change improves the existing PrebuiltSrcsSupplier mechanism to
support reporting errors so that the logic for selecting the source can
be done on demand rather than in separate mutators.

The main complication was that PrebuiltSrcsSupplier is called with a
BaseModuleContext for both source and prebuilt modules so it cannot use
any methods on it that are related to the current module. That
necessitated adding MultiTargets() to android.Module.

Bug: 181267622
Test: m droid
Change-Id: I106c78fd21016f051a315b82b470d8f12b1f820b
2021-03-01 17:11:25 +00:00
Paul Duffin 0d10c3c304 Verify the prebuilt_apex selects the correct input apex file
This will ensure that the following refactoring does not change the
behavior.

Bug: 181267622
Test: m nothing
Change-Id: Ieb9b37c2a1ef609b2d6565c54c261439a1ce7147
2021-03-01 17:10:31 +00:00
Paul Duffin c572b5bf62 Merge "Avoid hiddenapi ignoring prebuilt with missing dex implementation jar" 2021-03-01 17:04:53 +00:00
Paul Duffin 69804ac388 Merge "Allow java_sdk_library_import to contribute to hiddenapi processing" 2021-03-01 17:04:39 +00:00
Paul Duffin 0a8d5248ef Merge "Retrieve dex implementation jars from apex for java_sdk_library_import" 2021-03-01 17:04:27 +00:00
Jingwen Chen f28de7434b Merge "bp2build: add configurable attribute (select) support." am: 37bd24a1db am: 1c65191027
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1603778

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9795ead95b078025e65f90a5534935a2b137a30a
2021-03-01 15:24:31 +00:00
Jingwen Chen 1c65191027 Merge "bp2build: add configurable attribute (select) support." am: 37bd24a1db
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1603778

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib6ebd3defe385a6b8f3bfcc9eda56b3bd7deb03e
2021-03-01 14:16:57 +00:00