Commit Graph

3676 Commits

Author SHA1 Message Date
Paul Duffin
fff9e13ed8 Merge "Add boot_images to apex" am: 4a838dfb3f am: 4849ec99b9 am: 4694cf7c81
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1560278

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I59b4310efac004352f572252b78d68155f7d78e9
2021-02-01 11:39:07 +00:00
Ulyana Trafimovich
6be59d88c7 Merge "Write module dexpreopt.config for Make." am: a4fce3b488 am: 682808f0ad am: 136d087a8e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1541538

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2972ea7c62c787b8b674185d0e1febf19e173112
2021-02-01 11:38:58 +00:00
Paul Duffin
a78406f692 Merge "Add documentation for the different files created by hiddenapi" am: 523bb85995 am: e3b48e4034 am: 4c73a0d554
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1564636

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib82002ecf7d15dcda3dddb23ed2ef6fc9dcb85eb
2021-02-01 11:38:47 +00:00
Paul Duffin
4694cf7c81 Merge "Add boot_images to apex" am: 4a838dfb3f am: 4849ec99b9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1560278

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I61aa45660665daf63e98ff1d51c2171ba76e0aa8
2021-02-01 11:02:23 +00:00
Ulyana Trafimovich
136d087a8e Merge "Write module dexpreopt.config for Make." am: a4fce3b488 am: 682808f0ad
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1541538

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4c0696bbcf536ddbf875c9e6c9e43bbc602b4b3f
2021-02-01 11:02:14 +00:00
Paul Duffin
4c73a0d554 Merge "Add documentation for the different files created by hiddenapi" am: 523bb85995 am: e3b48e4034
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1564636

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I442b5bfd65dbb863d79926c562dbe81205518501
2021-02-01 11:02:07 +00:00
Paul Duffin
4a838dfb3f Merge "Add boot_images to apex" 2021-02-01 10:21:21 +00:00
Ulyana Trafimovich
a4fce3b488 Merge "Write module dexpreopt.config for Make." 2021-02-01 10:16:57 +00:00
Paul Duffin
a1d6025a49 Add boot_images to apex
Previously, the apex module had to hard code behavior specific to the
art apex module in order to include the art boot image. This change
adds support to the apex module to allow the boot images to be
specified per apex.

In combination with a change to add the "art-boot-image" to the ART
apex this allows the custom code for handling the art boot image in
apex to be removed.

That custom apex code also included the logic to ensure that the
GlobalSoongConfig was initialized for use by the dex_bootjars
singleton. That logic has been moved from the APEX to the boot_image
module. That ensures that it will be run if and only if a boot_image
module is present in the checked out repos. So, limited manifest
checkouts which do not contain the art or frameworks/base repos (which
is where the boot_image modules are defined) will not attempt to run
this logic, which would fail because dex2oat would not be present.

Bug: 177892522
Test: m droid
Change-Id: I02d25fbef6e864e31eb5e0f4eb50358c79486db0
2021-01-30 12:45:07 +00:00
Martin Stjernholm
a43e5c3cde Merge "Fix boot jar handling when both source and prebuilt APEXes and modules are present." am: c4e17317d1 am: d593a73257 am: 8784b2fe5d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1553594

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I37251d12bf78ce055394956b74bafb64ebbf8e6e
2021-01-30 00:54:15 +00:00
Martin Stjernholm
8784b2fe5d Merge "Fix boot jar handling when both source and prebuilt APEXes and modules are present." am: c4e17317d1 am: d593a73257
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1553594

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia050858ba2a5810b0e708f61a12fe536b571af7f
2021-01-29 23:43:27 +00:00
Paul Duffin
ff774a04ad Add documentation for the different files created by hiddenapi
Test: m nothing
Bug: 178361284
Change-Id: Id55646b9d4b7bc1acdb4ed6a6dd4456b746eb54c
2021-01-29 13:19:51 +00:00
Martin Stjernholm
c4e17317d1 Merge "Fix boot jar handling when both source and prebuilt APEXes and modules are present." 2021-01-29 13:15:02 +00:00
Martin Stjernholm
1dc0d6d7f2 Fix boot jar handling when both source and prebuilt APEXes and modules
are present.

1) The boot jar to APEX mapping is maintained by the base names for
both of them. When building with prebuilt modules and APEXes, that
means we need to take care to compare them without regard to any
"prebuilt_" prefixes.

2) VisitAllModules can visit disabled modules and both source and
prebuilt modules, so they need some conditions to skip modules that
aren't applicable for boot jars.

Test: `m droid`
Test: `m droid SOONG_CONFIG_art_module_source_build=false`
  with fresh ART Module prebuilts in place
Bug: 171061220
Change-Id: Iced269d29127bc8b8f9b3171adb60a97d115628b
2021-01-28 20:09:24 +00:00
Anton Hansson
ef6fe1bc46 Merge "Fix prebuilt_apis creating of "latest" incompatibilities" am: b0d0710f67 am: ebf442153d am: e879d64cf8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1558554

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ibf7de9ca813ba773542823482e5287e91cf71c30
2021-01-28 17:15:16 +00:00
Paul Duffin
b523679051 Merge "Add boot_image module type" am: b9d731c8a9 am: 70b8c656c6 am: e36b8727c1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1556240

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I7b3eea987e3cc9ec6106b9a8f250b8616d5c4589
2021-01-28 17:13:03 +00:00
Anton Hansson
e879d64cf8 Merge "Fix prebuilt_apis creating of "latest" incompatibilities" am: b0d0710f67 am: ebf442153d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1558554

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib4c4293da87ba27b18d7cd4107f907f44db14ae9
2021-01-28 17:00:51 +00:00
Paul Duffin
e36b8727c1 Merge "Add boot_image module type" am: b9d731c8a9 am: 70b8c656c6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1556240

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I06be6aab301bb86e24e253fa7b6d94cba258b02a
2021-01-28 16:48:30 +00:00
Anton Hansson
b0d0710f67 Merge "Fix prebuilt_apis creating of "latest" incompatibilities" 2021-01-28 16:48:16 +00:00
Ulya Trafimovich
76b0852a48 Write module dexpreopt.config for Make.
This is needed for Java libraries that are <uses-library> dependencies
of Java libraries and apps defined as Make modules. Each dexpreopted
module in Make generates a dexpreopt.config file, which incorporates
information from its dependencies' dexpreopt.config files. For
dependencies that are Make modules their dexpreopt.config files are
generated by Make, and for Soong modules they are generated by Soong.
Since Soong doesn't know which libraries are used by Make, it generates
build rules for a superset of the necessary libraries.

Bug: 132357300
Test: lunch aosp_cf_x86_phone-userdebug && m
Change-Id: I325b1037658736ee3c02450b08c00eca1a175962
2021-01-28 06:29:13 +00:00
Anton Hansson
20ce41d0b9 Fix prebuilt_apis creating of "latest" incompatibilities
Incompatibilities are a bit special in that we only ever want to use
the "latest" if it is for a non-finalized SDK.

Add a new argument, next_api_dir, and use only those files to create
"latest incompatibilities". Create empty incompatibilities for all
modules not in next_api_dir.

Bug: 178171189
Test: m
Change-Id: I727a52e3a45a5e607c6176d481b40fbf495c6eb0
2021-01-26 18:08:19 +00:00
Paul Duffin
650553e343 Merge "Make dexpreopt tools available for all java tests" am: 4c183c7581 am: ca6d1d9267 am: eef33b4e93
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1556241

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I304e79170ba080e4c7221d31d53726cb43714d03
2021-01-26 13:37:21 +00:00
Paul Duffin
3451e1600f Add boot_image module type
Adds a boot_image module type. Follow on changes will add instances of
boot_image to represent the ART and framework boot images in the art
and frameworks/base repositories respectively.

For the moment they retrieve their associated boot image configuration
from the map returned by genBootImageConfigs() and leave the actual
work of creating the ninja rules to create the boot images to the
dex_bootjars singleton.

Bug: 177892522
Test: m droid
Change-Id: Ib69701de0d24d996bb8e8be7a20b941be907390e
2021-01-26 13:00:07 +00:00
Paul Duffin
eef33b4e93 Merge "Make dexpreopt tools available for all java tests" am: 4c183c7581 am: ca6d1d9267
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1556241

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I33f4184727ea3781e96bd07ae0f32188ab3e08cf
2021-01-26 12:56:08 +00:00
Paul Duffin
4c183c7581 Merge "Make dexpreopt tools available for all java tests" 2021-01-26 12:08:30 +00:00
Paul Duffin
635aa0834f Make dexpreopt tools available for all java tests
Bug: 177892522
Test: m nothing
Change-Id: I594bddae692ef76dc8c3da504934d0151b13d4c9
2021-01-25 19:15:19 +00:00
Anton Hansson
77b715765f Merge "Minor cleanup in prebuilt_apis" am: 172f58b63b am: 80450686ca am: 1a441b417a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1558553

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I48dc8e12ca81c226524600aced26791b00e2ba12
2021-01-25 16:45:51 +00:00
Anton Hansson
1a441b417a Merge "Minor cleanup in prebuilt_apis" am: 172f58b63b am: 80450686ca
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1558553

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I3508884240819cad4e992f107e2313081c7870ac
2021-01-25 16:32:22 +00:00
Anton Hansson
370fd0b050 Minor cleanup in prebuilt_apis
Use ints instead of strings for version comparison.

Bug: 178171189
Test: m
Change-Id: I53d71b138a64b902b3f00adafec5d354630a5e35
2021-01-25 10:58:41 +00:00
Paul Duffin
d7ea4cd3f5 Merge "Switch dex_bootjars to a singleton module" am: 98325717b1 am: 4f6ac795dc am: e0b2bbbc29
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1555159

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I698251d7cec6e5613244367432c69d3efbd11fec
2021-01-22 19:19:18 +00:00
Paul Duffin
31c9004996 Merge "Allow createGlobalSoongConfig() to be used from tests" am: 8479ea296d am: 64b8cd1b52 am: 75ae5a3dc9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1556577

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib39cce4349a982ed80304e5ad25c67e0f08c16a9
2021-01-22 19:19:01 +00:00
Paul Duffin
068fb3d885 Merge "Add java.RegisterRequiredBuildComponentsForTest function" am: c44075b710 am: 398ab4e8c5 am: 465c9c034f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1555158

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I83e74ee100868f97303906ed6a1621d5dfd7149b
2021-01-22 19:18:02 +00:00
Paul Duffin
e0b2bbbc29 Merge "Switch dex_bootjars to a singleton module" am: 98325717b1 am: 4f6ac795dc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1555159

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ifce4c47789007d56c6c73ed4025a2427f1b8bb01
2021-01-22 18:45:56 +00:00
Paul Duffin
75ae5a3dc9 Merge "Allow createGlobalSoongConfig() to be used from tests" am: 8479ea296d am: 64b8cd1b52
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1556577

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8d8189912ea8fcb54950821119fe0583ceacca83
2021-01-22 18:45:48 +00:00
Paul Duffin
465c9c034f Merge "Add java.RegisterRequiredBuildComponentsForTest function" am: c44075b710 am: 398ab4e8c5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1555158

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If5c8a2641d1c670c024622a94b8ecda6b09539a2
2021-01-22 18:45:21 +00:00
Paul Duffin
98325717b1 Merge "Switch dex_bootjars to a singleton module" 2021-01-22 17:42:54 +00:00
Paul Duffin
8479ea296d Merge "Allow createGlobalSoongConfig() to be used from tests" 2021-01-22 17:42:00 +00:00
Paul Duffin
c44075b710 Merge "Add java.RegisterRequiredBuildComponentsForTest function" 2021-01-22 17:41:02 +00:00
Anton Hansson
880cb13323 Merge "Add a better error message for missing api files" am: 4de3c42c73 am: 54431da641 am: 842d34ac7b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1555156

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4072a0dc145efbc3e1968cadd32656b8d2efccf1
2021-01-22 12:06:29 +00:00
Anton Hansson
842d34ac7b Merge "Add a better error message for missing api files" am: 4de3c42c73 am: 54431da641
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1555156

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I1bfaf36ad15e2c771872fd80dc31d750cdeeffe0
2021-01-22 11:52:47 +00:00
Anton Hansson
4de3c42c73 Merge "Add a better error message for missing api files" 2021-01-22 10:31:15 +00:00
Paul Duffin
1ab6186e91 Switch dex_bootjars to a singleton module
The main difference between a singleton and a singleton module that
affects this change is that the latter requires a module to be defined
in order for the singleton to be instantiated. This change defines the
module in both the tests and the standard build.

Bug: 177892522
Test: m droid
Change-Id: Id6669835cf3a2ab7359fa53047eb9042992a9362
2021-01-21 16:49:34 +00:00
Paul Duffin
9f04524673 Allow createGlobalSoongConfig() to be used from tests
Previously, the createGlobalSoongConfig() function was explicitly
prevented from being used in tests because it would fail. However, it
turns out that is no longer the case and it does now work.

That allows the following changes to be made:
* Tests no longer need to use GlobalSoongConfigForTests() to
  prepopulate the cache.
* GlobalSoongConfigForTests() is only needed in the dexpreopt
  package.

Bug: 177892522
Test: m nothing
Change-Id: Ifcbb1a44254c5d2d10c1d02ab23227488d1d1ed1
2021-01-21 15:44:30 +00:00
Paul Duffin
c059c8c9a0 Add java.RegisterRequiredBuildComponentsForTest function
Insulate tests that exercise code in the java package from having to
register the build components provided by the java package by providing
a single function that registers them all. This follows the pattern
currently used in the cc and rust packages.

This change is in preparation for switching the dex_bootjars singleton
from a singleton, which does not require a module definition in order
to be instantiated, to a singleton module which does. That will require
adding a module definition into java.GatherRequiredDepsForTest() and
this change ensures that the required components will have been
registered in every test.

Bug: 177892522
Test: m nothing
Change-Id: I6475db8240894947dd07c89a940a3e4f201aa598
2021-01-21 11:47:32 +00:00
Nicolas Geoffray
981c30ca1e Merge "dexpreopt: Use the dirty-image-objects path from frameworks/base." am: 324234bd00 am: d2aff3c2a1 am: e707c51e31
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1555155

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ica0522d7c8cad6c00fe444178d11fa3a5e1833c7
2021-01-20 19:47:31 +00:00
Ulyana Trafimovich
1a2949251b Merge "Support building boot images with disabled dexpreopt." am: 0caabb6e27 am: 5602cf202b am: fb9314da42
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1555134

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5c35fc8382ab51307e4cb5e4a0b8b2d4c5553f8b
2021-01-20 19:46:47 +00:00
Bill Peckham
dccab29858 Merge changes from topic "prebuilt-hiddenapi" am: 1c8e5e817e am: 24ac16d6e6 am: 96ddf7f0b3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1546365

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I626d7b1481b000c75a949522b91db36fc2fe213a
2021-01-20 19:46:31 +00:00
Anton Hansson
e77fccc959 Add a better error message for missing api files
Add some instructions for what to do.

Bug: 177806245
Test: m nothing (with java_sdk_library with no tracking files)
Change-Id: I286018f4d9105d5ade1e76cddb8670d0d097d77d
2021-01-20 19:21:16 +00:00
Nicolas Geoffray
e707c51e31 Merge "dexpreopt: Use the dirty-image-objects path from frameworks/base." am: 324234bd00 am: d2aff3c2a1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1555155

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4e92e1ae8713f5451c9aa8aa097a576c3cd0f1a2
2021-01-20 19:02:51 +00:00
Ulyana Trafimovich
fb9314da42 Merge "Support building boot images with disabled dexpreopt." am: 0caabb6e27 am: 5602cf202b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1555134

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I21223b7babf61153570127b16157217316dfe52c
2021-01-20 19:02:18 +00:00