Commit Graph

4299 Commits

Author SHA1 Message Date
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
53325362e9 Automatically call TestingBuildParams.RelativeToTop() am: e8366da1f6 am: fe53b7a2df
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1655208

Change-Id: Ied3672ee9454a74a6b4d0169ea59898baf23b3cd
2021-03-30 21:44:07 +00: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
ef17c94085 Merge "Migrate system_modules_test.go from NormalizePathsForTesting" am: 87d3bae657 am: 41ded6e7da am: b90f91e43f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1654684

Change-Id: Ie6d613536371e18f06a8b59e6659a74af58f84ae
2021-03-30 18:32:17 +00: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
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
b90f91e43f Merge "Migrate system_modules_test.go from NormalizePathsForTesting" am: 87d3bae657 am: 41ded6e7da
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1654684

Change-Id: Ifc8b29510a047b2efb4db78198e46f64449177b7
2021-03-30 18:02:41 +00:00
Paul Duffin
9b7d7f45f0 Merge "Add the transitive dependencies of boot_image to apex" am: 58367574a5 am: 023bd16632
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1652623

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

Change-Id: Ic8c97eb640ca5d6dc0de0a8ac08391ed73bc0a0a
2021-03-30 17:44:23 +00:00
Paul Duffin
87d3bae657 Merge "Migrate system_modules_test.go from NormalizePathsForTesting" 2021-03-30 16:42:55 +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
8d3c44a986 Merge "Add contents property to boot_image (and prebuilt_boot_image)" 2021-03-30 16:26:20 +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
78dd45f054 Merge "Add dependencies for art boot_image" am: 16e6aeeb51 am: d019752f73
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1652451

Change-Id: Icf9a9823a7afb88ed96a0cd8aff0b43d983770ab
2021-03-29 21:39:57 +00:00
Paul Duffin
16e6aeeb51 Merge "Add dependencies for art boot_image" 2021-03-29 20:27:12 +00:00
Ulyana Trafimovich
f48877b046 Merge "Don't enforce <uses-library> checks if dexpreopt for apps is disabled." am: f682410cbf am: 1012c230b2 am: 42983b7316
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1655690

Change-Id: Iea739178209de07d66eeab82794392d0ff378743
2021-03-29 18:26:54 +00:00
Ulyana Trafimovich
42983b7316 Merge "Don't enforce <uses-library> checks if dexpreopt for apps is disabled." am: f682410cbf am: 1012c230b2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1655690

Change-Id: Iabd8654c105f9db1ed18616127e90679f77938e4
2021-03-29 17:40:23 +00:00
Paul Duffin
29888b1bf0 Migrate system_modules_test.go from NormalizePathsForTesting
Bug: 183650682
Test: m nothing
Change-Id: I9ccbbe521a449cb88ab13cde10161a41cfcf244c
2021-03-29 17:29:30 +01:00
Ulyana Trafimovich
f682410cbf Merge "Don't enforce <uses-library> checks if dexpreopt for apps is disabled." 2021-03-29 16:21:24 +00: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
Paul Duffin
82886d6cbf Add contents property to boot_image (and prebuilt_boot_image)
Allows boot_image modules to be created for any module that contributes
to the boot class path, e.g. core-i18n from the com.android.i18n.

A boot_image module with a contents property cannot specify an
image_name, and vice versa. Only those boot_image modules with an
image_name create .art, .oat and .vdex files, either in their
associated APEX or as part of the framework "boot" image.

Bug: 177892522
Test: m nothing
Change-Id: Idfc2bcf00dd6d3ed36ac4df46fcf18e8aa7e2c92
2021-03-29 17:15:27 +01:00
Paul Duffin
c7ef9892dd Add dependencies for art boot_image
Adds dependencies for the art boot image. The art boot image only
includes modules from the com.android.art APEX and so this change adds
some verification to make sure that the APEX component of the
configuration is compatible with the boot_image's apex_availabilty
settings and then just adds dependencies on the modules. It relies on
the normal APEX processing to cause the com.android.art variant of the
boot_image to depend on the equivalent variant of its contents.

This purposely does not check that the configuration specifies an APEX
of com.android.art and instead relies on the apex_available property
being set.

Bug: 177892522
Test: m nothing
Change-Id: I75a8238546b01e1f166a1d1444215f4afb441780
2021-03-29 17:13:29 +01:00
Paul Duffin
e06a34d148 Merge "Add bootclasspath_fragment as an alias for boot_image" am: 755b10fe53 am: 0c541b7c1d am: 3e56890e1d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1655217

Change-Id: I8e7eea3b7e1b1b0a47e24c800ffce33f9943e107
2021-03-29 15:42:23 +00:00
Paul Duffin
3e56890e1d Merge "Add bootclasspath_fragment as an alias for boot_image" am: 755b10fe53 am: 0c541b7c1d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1655217

Change-Id: Id99ca66bcec57e6fb4937479c789592609e45290
2021-03-29 14:56:24 +00:00
Paul Duffin
a84ef0bb15 Merge "Convert java/boot_image_test.go to test fixtures" am: 60fbea0ec6 am: 9b66f48c17 am: 682589237f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1652450

Change-Id: I48adf5836d42af746a7790ecfe93dfb9db771702
2021-03-29 14:19:59 +00:00
Paul Duffin
f9bedde16f Merge "Change type of Image_name from string to *string" am: 63782aba78 am: fb2be116cc am: 04a10f160c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1652449

Change-Id: Ie1c6adc7423d60309259d6555d2949c668dfc8a1
2021-03-29 14:19:53 +00:00
Ulya Trafimovich
39dd0a4b87 Don't enforce <uses-library> checks if dexpreopt for apps is disabled.
Otherwise the check fails, as it depend on non-existent dexpreopt.config
files. This CL fixes broken build cf_x86_phone-userdebug_coverage.

Bug: 183931403
Bug: 132357300
Test: forrest build for cf_x86_phone-userdebug_coverage.
Change-Id: Id3ffeb742c1b82c677795fa701a7b5a867eabbbd
2021-03-29 14:57:34 +01:00
Paul Duffin
682589237f Merge "Convert java/boot_image_test.go to test fixtures" am: 60fbea0ec6 am: 9b66f48c17
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1652450

Change-Id: I8d726e6dc502f7821834ac03facd7bcd7b70c381
2021-03-29 13:32:14 +00:00
Paul Duffin
04a10f160c Merge "Change type of Image_name from string to *string" am: 63782aba78 am: fb2be116cc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1652449

Change-Id: Icc357e1d093767bcf87481cb3f0875f3467a0853
2021-03-29 13:32:09 +00:00
Paul Duffin
4b64ba05b6 Add bootclasspath_fragment as an alias for boot_image
This is part of the work to rename boot_image to bootclasspath_fragment
which is being done for two reasons:
1. To avoid clashing with the bootimg module type.
2. To better reflect what this represents.

While a bootclasspath_fragment can create what ART calls a boot image
(which is different to what the bootimg module type represents) it does
not have to do so.

Bug: 177892522
Test: m nothing
Change-Id: Ib45604be7adc790ded9e27a2ac812dd7522ca8db
2021-03-29 11:05:55 +01:00
Paul Duffin
837486d308 Convert java/boot_image_test.go to test fixtures
Bug: 177892522
Test: m nothing
Change-Id: I91d2bd2eabe5916fd158501bd0d4fdb608919019
2021-03-29 11:05:55 +01:00
Paul Duffin
64be7bb32f Change type of Image_name from string to *string
Bug: 177892522
Test: m nothing
Change-Id: Id72b6079f11c28df6248e71998fb97851cfc5be9
2021-03-29 11:05:55 +01:00
Colin Cross
a9a3bf3e83 Merge changes I71a83e3a,I66101c0c,Ie387c8c4,Iea742e75 am: 045ed0f684 am: db081efb32 am: 3ea82d3acd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1652575

Change-Id: I6c5ca130bb1ccdc3aba64de076a24b3b89fe9b67
2021-03-26 17:19:05 +00:00
Colin Cross
3ea82d3acd Merge changes I71a83e3a,I66101c0c,Ie387c8c4,Iea742e75 am: 045ed0f684 am: db081efb32
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1652575

Change-Id: I37da513e99d28c8b718800a7dcf0e82520f5c2ec
2021-03-26 16:34:29 +00:00
Colin Cross
045ed0f684 Merge changes I71a83e3a,I66101c0c,Ie387c8c4,Iea742e75
* changes:
  Strengthen metalava sandbox support using sbox
  Move metalava's output files into a subdirectory
  Fix lint warnings in droidstubs.go
  Split droidstubs out of droiddoc.go
2021-03-26 15:14:53 +00:00
Colin Cross
8a63fa9fd2 Merge changes Ie8721dcd,If1827b9d,Iec250a2d,I3f46f611,Idf136919, ... am: ba5fff85a7 am: 0b0fcae3ca am: defc5c9f8a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1651847

Change-Id: Ifc60075b65f4f27134aaab9315e4c0ffe90f2481
2021-03-25 23:03:02 +00:00
Colin Cross
defc5c9f8a Merge changes Ie8721dcd,If1827b9d,Iec250a2d,I3f46f611,Idf136919, ... am: ba5fff85a7 am: 0b0fcae3ca
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1651847

Change-Id: I93a2b690fa182ec885e3c941df516c2e04679f1c
2021-03-25 22:13:56 +00:00
Colin Cross
ba5fff85a7 Merge changes Ie8721dcd,If1827b9d,Iec250a2d,I3f46f611,Idf136919, ...
* changes:
  Replace ANDROID_SDK_HOME with ANDROID_PREFS_ROOT for metalava
  Simplify lint rules using improved RuleBuilder rsp support
  Support multiple rsp files in RuleBuilder
  Pass rsp files into sbox and rewrapper
  Add test for sbox input sandboxing
  Support multiple rsp files in REParams
  Move response file handling to a separate package
2021-03-25 20:55:56 +00:00
Paul Duffin
b682a0d827 Merge "Filter duplicate modules in platform_compat_config_singleton" am: f329307878 am: 8313fb112c am: d412d5404f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1652267

Change-Id: I638fd20fa3ec3220985dc5b9f36d66c30015e276
2021-03-25 19:47:55 +00:00
Paul Duffin
2f2b70575f Merge "Fix TestDroiddoc's reliance on absolute paths" am: 6c968b1f0f am: 166ae29441 am: 37bb2910cc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1652617

Change-Id: I4c1bcda18cd65b19766aa385759696a5d7f0fbda
2021-03-25 19:47:37 +00:00
Roland Levillain
436b98b4bb Merge "Fix a typo in the definition of varApexNames in java/dexpreopt_bootjars.go." am: 737ad608ab am: 1cb436ebf0 am: ff6d63e4f2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1652467

Change-Id: Ida829111b3ef8f005ff6f138411904de2f1ce093
2021-03-25 19:42:56 +00:00
Paul Duffin
d412d5404f Merge "Filter duplicate modules in platform_compat_config_singleton" am: f329307878 am: 8313fb112c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1652267

Change-Id: I0d3d24bb408375cf08d129acb8b6f89c66636a34
2021-03-25 19:02:17 +00:00
Paul Duffin
37bb2910cc Merge "Fix TestDroiddoc's reliance on absolute paths" am: 6c968b1f0f am: 166ae29441
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1652617

Change-Id: I0342edafa036858721bfc0e919cfc7c63ae5010d
2021-03-25 19:02:02 +00:00
Roland Levillain
ff6d63e4f2 Merge "Fix a typo in the definition of varApexNames in java/dexpreopt_bootjars.go." am: 737ad608ab am: 1cb436ebf0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1652467

Change-Id: Ibd098123bdde4b3c08d71b557f9b9a9b1e26b106
2021-03-25 19:00:06 +00:00
Colin Cross
6aa5c40393 Strengthen metalava sandbox support using sbox
Run sandbox metalava rules inside sbox, which copies only the expected
inputs into a separate directory tree.  This ensures it can't read any
extra inputs.

Test: m hwbinder.stubs
Test: TestDroidstubs
Test: TestDroidstubsSandboxed
Change-Id: I71a83e3af6a385cc23f895397c2c883a2ac5fa22
2021-03-25 11:11:36 -07:00
Colin Cross
cb77f75aae Move metalava's output files into a subdirectory
Move all of the output files of the metalava rule into a single
subdirectory to make it compatible with sandboxing in sbox.

Test: TestDroidstubs
Change-Id: I66101c0c224dee702c8175e61c12cc9cd1aa8b93
2021-03-25 11:11:36 -07:00
Colin Cross
0d5324165a Fix lint warnings in droidstubs.go
Test: none
Change-Id: Ie387c8c4feddad7bd134604e442fd326e606cd2f
2021-03-25 11:11:36 -07:00
Colin Cross
2207f87756 Split droidstubs out of droiddoc.go
Split part of droiddoc.go into droidstubs.go.  Also split droiddoc_test.go
and droidstubs_test.go out of java_test.go.

Test: go test ./java
Change-Id: Iea742e75b6925b135016f7bbf3a168c696a6c433
2021-03-25 11:11:34 -07:00
Paul Duffin
f329307878 Merge "Filter duplicate modules in platform_compat_config_singleton" 2021-03-25 18:09:38 +00:00
Colin Cross
7ee54ffd70 Replace ANDROID_SDK_HOME with ANDROID_PREFS_ROOT for metalava
Fixes warnings:
Warning: Using ANDROID_SDK_HOME for the location of the '.android' preferences location is deprecated, please use ANDROID_PREFS_ROOT instead.
Support for ANDROID_SDK_HOME is deprecated and will be removed in 6.0

Test: m android_stubs_current
Change-Id: Ie8721dcda0578c670dfc796675ba43cda16883f6
2021-03-25 11:06:45 -07:00