Commit Graph

3551 Commits

Author SHA1 Message Date
Jaewoong Jung
de6671062a Merge "Remove unnecessary snake case variables." am: e794b1e302 am: ce131b6fcf am: e3ec6f723e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1533880

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2e481c45e9fcc2e0023c03aed89320c49678dc86
2020-12-23 02:15:09 +00:00
Jaewoong Jung
18aefc1977 Remove unnecessary snake case variables.
Test: m nothing + TreeHugger
Change-Id: I99f7162944daa6c57c6ae4763261e108bb5cb6b1
2020-12-22 12:38:35 -08:00
Colin Cross
08e19794be Merge "Add car packages to the legacy allowlist" 2020-12-22 19:09:18 +00:00
Colin Cross
0d39bf14ec Add car packages to the legacy allowlist
Car packages that were defined in Android.mk files need to be
added to the allowlist so they can be converted to Android.bp

Bug: 122333160
Test: m CarServiceTest DiagnosticTools
Change-Id: Ia7613f35c4392eac51c94b0d1da29ecac82eb103
2020-12-22 19:08:54 +00:00
Ulyana Trafimovich
7abbd99ddf Merge changes I6a512209,I56437f26 am: b630c37d61 am: 99d0a65605 am: 04072a75d2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1533342

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I032bbacddd19131010944a1340205e3244c6957d
2020-12-22 11:51:06 +00:00
Ulyana Trafimovich
b630c37d61 Merge changes I6a512209,I56437f26
* changes:
  Unify addition of class loader subcontext from dependencies.
  Move ClassLoaderContexts() method to UsesLibraryDependency interface.
2020-12-22 10:14:41 +00:00
Ulya Trafimovich
88bb6f6342 Unify addition of class loader subcontext from dependencies.
Previously CLC construction was scattered across different module types
and dependency tags. This CL moves all logic to one function, which
handles all special cases. This will allow to simplify CLC API and
reduce the number of different ways in which CLC is constructed.

Previously some of the cases failed early (at the time when a library is
added to CLC) if the build/install paths were unknown. Other cases did
not fail early, but were validated later before CLC was used. Late
failures are necessary because some of the libraries with unknown paths
still have to be processed by manifest_fixer (which doesn't need library
paths), but they do not use dexpreopt (which needs library paths). This
CL removes the early failures (all paths are still validated later).

The CLC tests do not fail because they use a private method that toggles
the "strict" flag (that enforces early/late failure mode) manually in
the method call.

The CL also makes a functional change in the way CLC is constructed for
component libraries that have an OptionalImplicitSdkLibrary(), or
libraries that are disguised as SDK libraries via `provides_uses_lib`.
Previously such a component/disguised library X was added to its own CLC
as a sibling element of X's own <uses-library> dependencies, which
created incorrect CLC structure. Now this is handled by addCLCFromDep,
when X is processed as dependency and added as a top-level CLC element
with its sub-CLC properly nested under it.

Bug: 132357300
Test: lunch aosp_cf_x86_phone-userdebug && m
Change-Id: I6a512209b87b81d785875f10f76b21c81b2ed579
2020-12-21 22:16:21 +00:00
Jaewoong Jung
1e3bf98992 Merge "Remove the return value from dexpreopt" am: 4eb5048585 am: c08ca970c9 am: 3ab305b8f0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1532723

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic131cf490323f25a2a7cd5b81e574d72903c7492
2020-12-21 17:19:05 +00:00
Jaewoong Jung
4b97a56615 Remove the return value from dexpreopt
dexpreopt doesn't strip dex files from the input jar anymore, so there's
no point returning the input jar path untouched.

Test: m nothing + TreeHugger
Change-Id: I8fde6cdc19e85a2fbc946513696417b945c5de0f
2020-12-17 09:43:28 -08:00
Ulya Trafimovich
dbf31665ab Move ClassLoaderContexts() method to UsesLibraryDependency interface.
This method logically belongs with other UsesLibraryDependency methods,
as it is used in the same context when computing class loader context.
Previously it was part of Dependency interface, which doesn't cover SDK
libraries. We do not currently have the necessary information for
SdkLibraryImport (so ClassLoaderContexts() returns nil for it), but we
do have it for SdkLibrary (via Library).

Bug: 132357300
Test: m nothing
Change-Id: I56437f260efc6a9af3f45b334e84e915244ccce1
2020-12-17 15:05:26 +00:00
Treehugger Robot
5818f23004 Merge "Assert android.ApexModule interface for types having ApexModuleBase" am: 1a74be780b am: 7d3e31bd70 am: bb56da8ed0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1530138

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Idc0a30d1747606337cfdfd4ce76495dcf4cadc05
2020-12-17 05:25:14 +00:00
Jiyong Park
45bf82e953 Assert android.ApexModule interface for types having ApexModuleBase
Bug: 173472337
Test: m nothing
Change-Id: Idf1c6cb9fff6c18e34c4636e38a662ba4ff7d538
2020-12-15 14:31:27 +00:00
Treehugger Robot
09d7f251ad Merge "Add dependency to list of asset files" am: 9ae3c52b20 am: d8e90b35dd am: 7d9f8d6137
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1494657

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I83cfab64bcd19accd4266bab030ff016cd63a1f6
2020-12-12 03:34:30 +00:00
Colin Cross
c20dc8533e Add dependency to list of asset files
We had a dependency on each file in the asset directories, but that
wouldn't cause aapt2 to run if a file was removed.  Add a dependency
on a file that contains the list of files in the asset directories.

Fixes: 172867096
Test: m CarrierConfig && rm packages/apps/CarrierConfig/assets/carrier_config_no_sim.xml && m CarrierConfig
Change-Id: I35f3b85355fa890a3e95eaa6458a21466b6930e4
2020-12-11 19:54:16 +00:00
Treehugger Robot
333f9b4c39 Merge "Remove AndroidMkExtraFootersFunc entries param." am: cac133df14 am: 528d2fdc51 am: e1ba585449
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1519314

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I855cb1808bfdf783ae4f16ece7c23bc6bda3f34c
2020-12-10 07:57:46 +00:00
Treehugger Robot
cac133df14 Merge "Remove AndroidMkExtraFootersFunc entries param." 2020-12-10 07:04:02 +00:00
Treehugger Robot
c1616617d7 Merge "Soong: remove output file before running signapk" am: 413c3bea63 am: 69ac81038a am: b6e8f09d2a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1511908

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id146521c3c0b5143d60d669ef22ddae491e73809
2020-12-09 18:02:21 +00:00
Treehugger Robot
413c3bea63 Merge "Soong: remove output file before running signapk" 2020-12-09 16:58:02 +00:00
Treehugger Robot
f4c3f8eab5 Merge "Soong: remove output file before running SoongZip" am: 5b0b94ecea am: a646d475a1 am: d1fb4184ad
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1511278

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I81b321db1bd3bc0f0000d0ba087cfe336e14c5ab
2020-12-09 09:18:08 +00:00
Treehugger Robot
5e0e7fefc0 Merge "Prebuilt is enabled even if the source one is not." am: 6bba8382af am: 0a30c0b67b am: e8f8ce9de4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1521068

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9e1826d8026b8a978c0e750f4f36ad7f4186efb2
2020-12-09 08:37:12 +00:00
Treehugger Robot
5b0b94ecea Merge "Soong: remove output file before running SoongZip" 2020-12-09 08:05:06 +00:00
Jaewoong Jung
729c0bdb54 Prebuilt is enabled even if the source one is not.
This fix a bug in a recent android_app_import-related change
(I8215aa1a6dad74b503eaa1169a64f8c30dda287c) where it uses an incorrect
module reference, and so disables a prebuilt module if its source-based
counterpart is disabled.

Test: app_test.go
Bug: 152343232
Change-Id: Ic7f5ca40be58f06e44b5ec4945caf209ef2dae96
2020-12-08 19:11:54 -08:00
Paul Duffin
dd45854679 Merge changes Ie51f097e,Ibf26da14 am: c27dd1a9bb am: 1e030c5937 am: 50302f75e4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1516939

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I47db682b373374210510684d38f8a75cd6c85524
2020-12-08 15:35:52 +00:00
Jaewoong Jung
02b11a6035 Remove AndroidMkExtraFootersFunc entries param.
I added in case anyone needs to access AndroidMkEntries to generate
footer lines, but nobody uses it, and it only confuses people.

Test: m nothing, TreeHugger
Change-Id: Ic8a450e3c306d9228c1fdec212c7441bd6aaee03
2020-12-07 10:23:54 -08:00
Paul Duffin
fc02166dab Use apex and jar to select boot image dex jar
Previously, only the <jar> part of the boot image configuration pair of
<apex>:<jar> was used to select the module that provides the boot image
dex. The name was sufficient to select the module but not the module
variant and it relied on the platform variant not being installed to
select a unique variant. Unfortunately, when modules are provided as
prebuilts they are not installed and so they get ignored.

This change removes the install check and instead checks the <apex> as
well to select a unique variant.

It also moves the DexJarBuildPath() and ApexModule checks to after
checking the name and treats them as errors. It is safe to do so
because every module that has the same name has to have the same module
type and in order for the module to be valid in the boot image
configuration it must pass those two checks. Treating these as errors
rather than silently ignoring them makes it easier to diagnose problems
with the configuration and/or the boot image modules.

Test: m droid
Bug: 171061220
Change-Id: Ie51f097e081907ea5b75d75840736b10d8d883e8
2020-12-07 17:36:53 +00:00
Paul Duffin
db77e14d84 Ensure that only one dex jar is chosen for each boot image library
This change does not break modules like "core-oj" that are in multiple
apexes, i.e. com.android.art, com.android.art.debug and
com.android.art.testing because they all shared the same variant. So,
the getBootImageJar() is only called once for that variant.

Test: m droid
Bug: 171061220
Change-Id: Ibf26da147af2b49ab9e4588030e8cd4002d04a7a
2020-12-07 17:30:48 +00:00
Jaewoong Jung
d40206c203 Merge "No matching variant android_app_import fix" am: 71debbfcc5 am: 3ebd82baca am: 6db9994f5f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1518388

Change-Id: I816b370228753e991643907d8a3443036aa001f9
2020-12-07 15:27:20 +00:00
Jaewoong Jung
71debbfcc5 Merge "No matching variant android_app_import fix" 2020-12-07 14:33:17 +00:00
Paul Duffin
407fd92ef7 Merge "Improve error messages for missing dependencies" am: 5e2697117f am: be6f1e64af am: 7d7a672aa2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1516937

Change-Id: If0b5d33c8799d4ce110d33993116e022b854c79a
2020-12-07 11:48:31 +00:00
Ulyana Trafimovich
1fe69eff47 Merge changes I697a65e4,Iaac6aaf6 am: 678ddb9d24 am: b75a82f874 am: 2061dacccc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1515502

Change-Id: I5739e75889fea4a0af49751366da2d313fee8086
2020-12-07 11:46:32 +00:00
Paul Duffin
5e2697117f Merge "Improve error messages for missing dependencies" 2020-12-07 10:40:07 +00:00
Ulyana Trafimovich
678ddb9d24 Merge changes I697a65e4,Iaac6aaf6
* changes:
  Do not propagate <uses-library> deps through static SDK component libs.
  Make error message more precise.
2020-12-07 10:01:40 +00:00
Jaewoong Jung
84f1b80866 No matching variant android_app_import fix
This fixes a bug where android_app_import or android_test_import without
a matching variant or a default apk property value breaks the build.

Test: app_test.go
Fixes: 152343232
Change-Id: I8215aa1a6dad74b503eaa1169a64f8c30dda287c
2020-12-04 11:51:29 -08:00
Paul Duffin
7f48eeff59 Improve error messages for missing dependencies
Adds some additional information into the paths that are created when
modules are missing in Soong but SOONG_ALLOW_MISSING_DEPENDENCIES=true.

Test: try and build platform against art prebuilts
Bug: 171061220
Change-Id: Ifbcc0af5bdbd15409758a3b6f216cf9b3b5dba31
2020-12-04 16:21:57 +00:00
Treehugger Robot
5c4d32a991 Merge "Dogfood the new IR Kotlin compiler backend." am: cf8b2ee16e am: ac0b51ec1d am: 238bddc7d9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1515505

Change-Id: Icc8e62c0e8bd14e59356a5f3aac10cd4f0357d48
2020-12-04 01:37:19 +00:00
Colin Cross
dbedb52c42 Merge "Pass pctx and ctx to NewRuleBuilder" am: 897a5ad507 am: c5666f9231 am: e4e955818a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1500984

Change-Id: I7363070bee2d127e96e15433fc76d3bb2aaf3477
2020-12-04 01:36:00 +00:00
Treehugger Robot
cf8b2ee16e Merge "Dogfood the new IR Kotlin compiler backend." 2020-12-04 00:05:07 +00:00
Colin Cross
897a5ad507 Merge "Pass pctx and ctx to NewRuleBuilder" 2020-12-03 20:07:30 +00:00
Ulya Trafimovich
65b031910b Do not propagate <uses-library> deps through static SDK component libs.
If some Java library/app depends on an SDK component library (e.g. stubs
library), then it transitively depends on the SDK library itself
(because the component library has a dependency on its SDK library).

Previously having this transitive dependency resulted in adding the SDK
library to the <uses-library> dependencies of the library/app. However,
this doesn't make sense if the app has a *static* dependency on the
component library. This patch stops adding <uses-library> dependency in
that case.

Bug: 132357300
Test: m nothing
Test: added new Soong test that would previously fail with an error:
   invalid build path for <uses-library> "fred"
Change-Id: I697a65e461037c95ec56b6c321afa4ec52ccbbec
2020-12-03 16:50:22 +00:00
Mads Ager
ad2bfda285 Dogfood the new IR Kotlin compiler backend.
Test: make
Test: atest com.android.systemui

Change-Id: I610058001bde19554c55dee5a79ad1782abc3186
2020-12-03 12:23:55 +01:00
Jaewoong Jung
5c762ba3d4 Merge "Improve comments in java/aapt2.go" am: 6a96b82937 am: 446c6953d7 am: 5fe5372cf9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1507120

Change-Id: I11e54d86f03290af1cef763d9938da8244c1f9fe
2020-12-02 16:39:08 +00:00
David Su
950366c204 Merge "legacy_core_platform_api_usage: Remove FrameworksWifiTests" 2020-12-02 16:16:48 +00:00
Jaewoong Jung
6a96b82937 Merge "Improve comments in java/aapt2.go" 2020-12-02 15:19:56 +00:00
Treehugger Robot
f1ba003fe2 Merge "Fix the instructions for regenerating .txt" am: b28bd8cd66 am: db4e388423 am: 2d119df969
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1513924

Change-Id: Icb5fe0a4c0970cd6f6d7229ff32a7f0e91d1ccfd
2020-12-02 14:29:43 +00:00
Treehugger Robot
b28bd8cd66 Merge "Fix the instructions for regenerating .txt" 2020-12-02 13:01:37 +00:00
JaeMan Park
bd696ae847 Merge "Add java sdk library enforcement flag" am: a4d314c91c am: c11aa53de1 am: 828ed93814
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1475897

Change-Id: Ie2e54ca097b9936f9ff018a1f73d17fa5a5447e9
2020-12-02 06:42:07 +00:00
JaeMan Park
a4d314c91c Merge "Add java sdk library enforcement flag" 2020-12-02 04:39:10 +00:00
Colin Cross
f1a035e6be Pass pctx and ctx to NewRuleBuilder
Enable the RuleBuilder and RuleBuilderCommand methods to access
the BuilderContext by passing it to NewRuleBuilder instead of
RuleBuilder.Build.

Test: genrule_test.go
Test: rule_builder_test.go
Test: m checkbuild
Change-Id: I63e6597e19167393876dc2259d6f521363b7dabc
2020-12-01 16:22:16 -08:00
Treehugger Robot
47dbd19a4e Merge "Add test suite handling to central androidmk code" am: 464e6c71df am: 5ac52e71e5 am: 724510fec9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1513215

Change-Id: I0af64442017986754089a361e01dbecbc2450c5f
2020-12-01 23:59:09 +00:00
Treehugger Robot
464e6c71df Merge "Add test suite handling to central androidmk code" 2020-12-01 22:19:26 +00:00