Commit graph

21266 commits

Author SHA1 Message Date
Ulyana Trafimovich
d972866eb5 Merge "Use common helper functions for getting sorted map keys." am: 49b1e9b6ce
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1404519

Change-Id: I2ad29eeb5a9b7a2b69854f945f8ed8f912655eff
2020-08-21 10:06:32 +00:00
Ulyana Trafimovich
df14a1b9c2 Merge "Propagate transitive <uses-library> dependencies through static libraries." am: bde92fc6be
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1404787

Change-Id: I03a83e7a2cab6cdb5d8e74df979440bb243d6ec3
2020-08-21 10:04:32 +00:00
Ulyana Trafimovich
49b1e9b6ce Merge "Use common helper functions for getting sorted map keys." 2020-08-21 09:36:30 +00:00
Ulyana Trafimovich
bde92fc6be Merge "Propagate transitive <uses-library> dependencies through static libraries." 2020-08-21 09:36:10 +00:00
Treehugger Robot
a3d1c127a2 Merge "Reland: Deduplicate APEX variants that would build identically" am: 68bfe074c6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1405087

Change-Id: I3839e80972dbc025b504f4593538f589be079389
2020-08-21 07:21:53 +00:00
Treehugger Robot
68bfe074c6 Merge "Reland: Deduplicate APEX variants that would build identically" 2020-08-21 06:46:51 +00:00
Treehugger Robot
0d1812df60 Merge "Add Goma deprecation PSA to soong." am: c70043aec2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1403640

Change-Id: I828f1770c3ad4f3d6a5c561dadd93735e413581f
2020-08-21 04:39:42 +00:00
Treehugger Robot
c70043aec2 Merge "Add Goma deprecation PSA to soong." 2020-08-21 04:26:11 +00:00
Treehugger Robot
305935590d Merge "Capture list of unused methods when shrinking in R8" am: c23d6031b0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1401848

Change-Id: Iff923f6fe8ba1d4cd0d93cc182ad6aaaa7d7e6bd
2020-08-21 00:36:49 +00:00
Treehugger Robot
c23d6031b0 Merge "Capture list of unused methods when shrinking in R8" 2020-08-21 00:28:24 +00:00
Treehugger Robot
b8638926f4 Merge "Allow globally disabling some clang-tidy checks." am: 66790d8943
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1403127

Change-Id: Ia2351d00d6952fea7f82268e4d345306e6118bff
2020-08-20 20:13:44 +00:00
Treehugger Robot
66790d8943 Merge "Allow globally disabling some clang-tidy checks." 2020-08-20 19:51:31 +00:00
Jeffrey Vander Stoep
507f3f0c0f Merge "Rust: use 1.45.2 prebuilts" am: 2e8a617bca
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1398476

Change-Id: I2d5e9e8d887f1bf3ed1c0de2dd34370b28bd372f
2020-08-20 17:23:46 +00:00
Jeffrey Vander Stoep
2e8a617bca Merge "Rust: use 1.45.2 prebuilts" 2020-08-20 17:14:19 +00:00
Ulya Trafimovich
b8063c6a86 Use common helper functions for getting sorted map keys.
Add a new helper SortedIntKeys similar to SortedStringKeys.

Test: lunch aosp_cf_x86_phone-userdebug && m
Change-Id: I08a43ec2cae7d1a82531295aca1a0658e3a0dd6f
2020-08-20 12:37:03 +01:00
Ulya Trafimovich
4b6d4c12cc Propagate transitive <uses-library> dependencies through static libraries.
Bug: 163037089
Test: lunch aosp_cf_x86-userdebug && m nothing
Test: added testcase in Soong
Change-Id: I943d497d779ca218a16e7208029189a1a69086c1
2020-08-20 12:34:42 +01:00
Ulyana Trafimovich
9b67bbd11c Merge "Collect paths to transitive SDK Java library dependencies." am: 9ce2221791
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1402668

Change-Id: I2f12e92ce08bd75d19073a0ba19aca2b07142422
2020-08-20 11:02:10 +00:00
Ulyana Trafimovich
9ce2221791 Merge "Collect paths to transitive SDK Java library dependencies." 2020-08-20 10:37:58 +00:00
Colin Cross
cb6143a142 Capture list of unused methods when shrinking in R8
Use the -printusage flag in R8 to output a list of the unused
methods.  Some of the files can be large (2MB for DocumentsUI,
87MB for all of AOSP), so immediately zip them and remove the
originals.  The zipped files will be merged and disted.

Bug: 151857441
Test: m TARGET_BUILD_APPS=DocumentsUI dist
Change-Id: I780e84e80eba7fe4d4fa15fec0f461890afd900b
2020-08-19 11:19:14 -07:00
Colin Cross
aede88c1c7 Reland: Deduplicate APEX variants that would build identically
APEX variants that share the same SDK version and updatability
almost always use identical command line arguments to build but
with different intermediates directories.  This causes unnecessary
build time and disk space for duplicated work.

Deduplicate APEX variants that would build identically.  Create
aliases from the per-APEX variations to the new shared variations
so that the APEX modules can continue to depend on them via the
APEX name as the variation.

This has one significant change in behavior.  Before this change,
if an APEX had two libraries in its direct dependencies and one
of those libraries depended on the other, and the second library
had stubs, then the first library would depend on the implementation
of the second library and not the stubs.  After this change, if
the first library is also present in a second APEX but the second
library is not, then the common variant shared between the two
APEXes would use the stubs, not the implementation.

In a correctly configured set of build rules this change will
be irrelevant, because if the compilation worked for the second
APEX using stubs then it will work for the common variant using
stubs.  However, if an incorrect change to the build rules is
made this could lead to confusing errors, as a previously-working
common variant could suddenly stop building when a module is added
to a new APEX without its dependencies that require implementation
APIs to compile.

This change reduces the number of modules in an AOSP arm64-userdebug
build by 3% (52242 to 50586), reduces the number of variants of the
libcutils module from 74 to 53, and reduces the number of variants
of the massive libart[d] modules from 44 to 32.

This relands I0529837476a253c32b3dfb98dcccf107427c742c with a fix
to always mark permissions XML files of java_sdk_library modules as
unique per apex since they contain the APEX filename, and a fix
to UpdateUniqueApexVariationsForDeps to check ApexInfo.InApexes
instead of DepIsInSameApex to check if two modules are in the same
apex to account for a module that depends on another in a way that
doesn't normally include the dependency in the APEX (e.g. a libs
property), but the dependency is directly included in the APEX.

Bug: 164216768
Test: go test ./build/soong/apex/...
Change-Id: I2ae170601f764e5b88d0be2e0e6adc84e3a4d9cc
2020-08-19 10:21:17 -07:00
Ulya Trafimovich
31e444e101 Collect paths to transitive SDK Java library dependencies.
Previously only the names were collected, and later used in the
manifest_fixer to add missing <uses-library> entries to the manifest.
Now we also need to collect build-time and on-device paths, to be used
in class loader context for dexpreopt. This commit only collects paths,
but does not pass them to dexpreopt yet.

Test: lunch aosp_cf_x86_phone-userdebug && m
Bug: 132357300
Change-Id: I34b229ee68f16ba215ba03770feadb4d890ec2bf
2020-08-19 13:51:21 +01:00
Treehugger Robot
2a3d0ade4c Merge "Add AIDL compiler to allowed Rust paths" am: 2d815963ba
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1394307

Change-Id: Ib892f2d01237bf56592356fdefa32859d13a6378
2020-08-18 22:12:44 +00:00
Treehugger Robot
2d815963ba Merge "Add AIDL compiler to allowed Rust paths" 2020-08-18 22:00:42 +00:00
Ramy Medhat
f668917c25 Add Goma deprecation PSA to soong.
Test: build with Goma
Change-Id: Ie7e146285afd40bc0a1dc17a0b898960f57a118b
2020-08-18 17:29:48 -04:00
Dan Albert
d12afec49c Allow globally disabling some clang-tidy checks.
Test: used for the upcoming compiler update
Bug: None
Change-Id: Id17db2c48fa3e165da81a1d084827bde142406dd
2020-08-18 13:28:03 -07:00
Jaewoong Jung
b3669f516c Merge "Add data bin and lib properties to sh_test" am: 1b7bc1c4b2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1403829

Change-Id: I7f8cc56597ffd5bcc23a40385172dab2baf7441f
2020-08-18 19:54:23 +00:00
Jaewoong Jung
1b7bc1c4b2 Merge "Add data bin and lib properties to sh_test" 2020-08-18 19:46:27 +00:00
Treehugger Robot
b1d3c4c4d7 Merge "Revert "Deduplicate APEX variants that would build identically"" am: fc4d79598c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1403647

Change-Id: I5f42f292247599f4f374ecdba31fdb72088de3ad
2020-08-18 17:32:22 +00:00
Treehugger Robot
fc4d79598c Merge "Revert "Deduplicate APEX variants that would build identically"" 2020-08-18 17:19:40 +00:00
Jaewoong Jung
6e0eee522d Add data bin and lib properties to sh_test
This attempts to reland I7b64de4b06e9bba3fba3712b25dd9f9d112e1625
by fixing Mac-related test issues, yet again.

Test: sh_binary_test.go
Test: Modified ziptool-tests
Bug: 156980228
Change-Id: Id3952e136c1dabfcd34048b6c9f31d0125a623df
2020-08-18 09:25:34 -07:00
Jaewoong Jung
de47113bd0 Merge "Revert "Add data bin and lib properties to sh_test"" am: ff6752dfbc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1403827

Change-Id: I618d6e2a5d74b617466a666c903c36c0f86e8b18
2020-08-18 16:05:33 +00:00
Jaewoong Jung
ff6752dfbc Merge "Revert "Add data bin and lib properties to sh_test"" 2020-08-18 15:53:33 +00:00
Jaewoong Jung
105699aee2 Revert "Add data bin and lib properties to sh_test"
This reverts commit a41a8877cb.

Reason for revert: Broke Darwin builds

Change-Id: I4371d735ffea51f7c349b4d223bc91c103163015
2020-08-18 15:34:45 +00:00
Jaewoong Jung
baffa3d08e Merge "Add data bin and lib properties to sh_test" am: a55e8945fa
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1402208

Change-Id: I7a7ac19f579e6a3ae1fa89e12a0e5772316f81a7
2020-08-18 15:32:58 +00:00
Jaewoong Jung
a55e8945fa Merge "Add data bin and lib properties to sh_test" 2020-08-18 15:17:40 +00:00
Pete Bentley
0c7b26e0e2 Revert "Deduplicate APEX variants that would build identically"
This reverts commit d6b2525b00.

Reason for revert: <Breaks tests - confirmed by Forrest: b/165188843>

Change-Id: I7cb68cb87522415004390c0672dc774e0067b122
2020-08-18 13:44:59 +00:00
Anton Hansson
ac3addb71b Merge "Remove special-cased stub deps on framework-res" am: 85f59b7b54
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1398475

Change-Id: Ib1af1a2fead8bbe5e78b111b09246c70e1efe655
2020-08-18 12:12:21 +00:00
Anton Hansson
85f59b7b54 Merge "Remove special-cased stub deps on framework-res" 2020-08-18 11:58:57 +00:00
Anton Hansson
8dffd9e1aa Merge "Add a tagged output for app's exportPackage" am: 72ce814def
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1398474

Change-Id: If2e7914eff1aec89d76c3a666a57773547bf852d
2020-08-18 11:48:15 +00:00
Anton Hansson
72ce814def Merge "Add a tagged output for app's exportPackage" 2020-08-18 11:38:46 +00:00
Treehugger Robot
aa3235edcc Merge "Deduplicate APEX variants that would build identically" am: ca29a25d38
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1399832

Change-Id: Ic3727a541bb7a098fe81ca0d4cf92e2139f1a7ab
2020-08-18 05:07:22 +00:00
Treehugger Robot
ca29a25d38 Merge "Deduplicate APEX variants that would build identically" 2020-08-18 04:50:12 +00:00
Treehugger Robot
b8b19daf9d Merge "Make the default exec strategy for javac/r8/d8 remote local fallback." am: 90905c0c68
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1399527

Change-Id: I7e2b1be312e1d0ccf2b77f463bce343852aa091f
2020-08-18 01:07:12 +00:00
Treehugger Robot
90905c0c68 Merge "Make the default exec strategy for javac/r8/d8 remote local fallback." 2020-08-18 00:54:03 +00:00
Colin Cross
d6b2525b00 Deduplicate APEX variants that would build identically
APEX variants that share the same SDK version and updatability
almost always use identical command line arguments to build but
with different intermediates directories.  This causes unnecessary
build time and disk space for duplicated work.

Deduplicate APEX variants that would build identically.  Create
aliases from the per-APEX variations to the new shared variations
so that the APEX modules can continue to depend on them via the
APEX name as the variation.

This has one significant change in behavior.  Before this change,
if an APEX had two libraries in its direct dependencies and one
of those libraries depended on the other, and the second library
had stubs, then the first library would depend on the implementation
of the second library and not the stubs.  After this change, if
the first library is also present in a second APEX but the second
library is not, then the common variant shared between the two
APEXes would use the stubs, not the implementation.

In a correctly configured set of build rules this change will
be irrelevant, because if the compilation worked for the second
APEX using stubs then it will work for the common variant using
stubs.  However, if an incorrect change to the build rules is
made this could lead to confusing errors, as a previously-working
common variant could suddenly stop building when a module is added
to a new APEX without its dependencies that require implementation
APIs to compile.

This change reduces the number of modules in an AOSP arm64-userdebug
build by 3% (52242 to 50586), reduces the number of variants of the
libcutils module from 74 to 53, and reduces the number of variants
of the massive libart[d] modules from 44 to 32.

Bug: 164216768
Test: go test ./build/soong/apex/...
Change-Id: I0529837476a253c32b3dfb98dcccf107427c742c
2020-08-17 15:18:31 -07:00
Treehugger Robot
ed688224e9 Merge "Override EarlyModuleContext.Namespace" am: 8cb67e4358
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1401847

Change-Id: I798a7fa68345ed7407d8ab3d6c99933392915ad2
2020-08-17 19:49:24 +00:00
Treehugger Robot
8cb67e4358 Merge "Override EarlyModuleContext.Namespace" 2020-08-17 19:37:39 +00:00
Jaewoong Jung
a41a8877cb Add data bin and lib properties to sh_test
This attempts to reland I7b64de4b06e9bba3fba3712b25dd9f9d112e1625
by fixing Mac-related test issues.

Test: sh_binary_test.go
Test: Modified ziptool-tests
Bug: 156980228
Change-Id: Icb7bfb183f6a1d429caefc05b0550aff292d7633
2020-08-17 10:01:41 -07:00
Treehugger Robot
73a14bb9e5 Merge "Rename class2greylist" am: 51636c0ae9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1398467

Change-Id: I636354f2b13cd9352855faf66b10d273318dfcbe
2020-08-17 16:35:29 +00:00
Treehugger Robot
51636c0ae9 Merge "Rename class2greylist" 2020-08-17 16:33:21 +00:00