Commit Graph

3124 Commits

Author SHA1 Message Date
Ulyana Trafimovich
c3036fea58 Merge "Propagate transitive <uses-library> dependencies through static libraries." am: bde92fc6be am: df14a1b9c2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1404787

Change-Id: If5cdcd9ac021315fd44aca73fdc14ec63cce4b7c
2020-08-21 10:19:46 +00:00
Ulyana Trafimovich
bde92fc6be Merge "Propagate transitive <uses-library> dependencies through static libraries." 2020-08-21 09:36:10 +00:00
Treehugger Robot
4d9984eeb1 Merge "Reland: Deduplicate APEX variants that would build identically" am: 68bfe074c6 am: a3d1c127a2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1405087

Change-Id: I7cf0c8d2c27757395e54fb4cc8592f438aa6ccaa
2020-08-21 07:38:47 +00:00
Treehugger Robot
68bfe074c6 Merge "Reland: Deduplicate APEX variants that would build identically" 2020-08-21 06:46:51 +00:00
Treehugger Robot
c4882aad53 Merge "Capture list of unused methods when shrinking in R8" am: c23d6031b0 am: 305935590d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1401848

Change-Id: Ib4b985bd627d57a210c0d49c1e2e933ba958dba0
2020-08-21 00:49:14 +00:00
Treehugger Robot
c23d6031b0 Merge "Capture list of unused methods when shrinking in R8" 2020-08-21 00:28:24 +00: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
b8595bcb8c Merge "Collect paths to transitive SDK Java library dependencies." am: 9ce2221791 am: 9b67bbd11c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1402668

Change-Id: Ib15bc0cb3fd0d53506eb36f895f04dfc8665df24
2020-08-20 11:11:01 +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
671aed59c9 Merge "Revert "Deduplicate APEX variants that would build identically"" am: fc4d79598c am: b1d3c4c4d7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1403647

Change-Id: Ia2db2038480c3e09e7c82c1766f9b922e5cc6a11
2020-08-18 17:42:08 +00:00
Treehugger Robot
fc4d79598c Merge "Revert "Deduplicate APEX variants that would build identically"" 2020-08-18 17:19: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
f05025fc83 Merge "Remove special-cased stub deps on framework-res" am: 85f59b7b54 am: ac3addb71b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1398475

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

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

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

Change-Id: I34ee62db0fb6a5d8e529aa58d14cf9769aa012eb
2020-08-18 01:18:07 +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
238fc79888 Merge "Rename class2greylist" am: 51636c0ae9 am: 73a14bb9e5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1398467

Change-Id: Ie701e77e563cf84a36e7920787be66b46aab40e2
2020-08-17 16:50:10 +00:00
Treehugger Robot
51636c0ae9 Merge "Rename class2greylist" 2020-08-17 16:33:21 +00:00
Anton Hansson
8f903f30ff Remove special-cased stub deps on framework-res
This dep is now possible to express in native Android.bp syntax,
which makes the build easier to understand.

Bug: 161214753
Test: build sdk, diff out/dist before and after
Change-Id: I878eda49b5bf54aaf581fc52e0fe9719e4bcdfce
Merged-In: I878eda49b5bf54aaf581fc52e0fe9719e4bcdfce
2020-08-17 11:00:03 +01:00
Anton Hansson
092aca410f Add a tagged output for app's exportPackage
This allows the android stubs to depend on framework-res' exportPackage
without special-casing inside the build system.

Bug: 161214753
Test: depending on this output in a followup CL
Change-Id: I8c5d17540d2624974983d73e56ba17898505dba8
2020-08-17 11:00:00 +01:00
Treehugger Robot
11ff8974eb Merge "Rename ApexName to ApexVariationName" am: a07777d434 am: be9a9035f2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1399831

Change-Id: I31f1d4eedbad29ac1562834ea70eb52e0c543ecd
2020-08-15 07:02:47 +00:00
Treehugger Robot
a07777d434 Merge "Rename ApexName to ApexVariationName" 2020-08-15 06:43:52 +00:00
Colin Cross
e07f2316b7 Rename ApexName to ApexVariationName
In preparation for reusing the same variation for multiple apexes,
rename ApexName to ApexVariationName.

Bug: 164216768
Test: all soong tests
Change-Id: I88f2c5b192ffa27acd38e01952d0cefd413222a0
2020-08-13 17:50:29 -07:00
Colin Cross
e3b91dc7fb Merge changes I02fb745a,Iccc96c0d am: a24b9deb5f am: 094956cf00
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1378536

Change-Id: I8a434610d1869e30a853208d974a16196aa9e884
2020-08-13 22:28:35 +00:00
Colin Cross
a24b9deb5f Merge changes I02fb745a,Iccc96c0d
* changes:
  Follow all shared library dependencies when collecting JNI libraries
  Handle static unwinder in ltoDepsMutator
2020-08-13 21:55:53 +00:00
Andrei Onea
23fea04e27 Rename class2greylist
Use a more inclusive name (go/hiddenapi-list-renaming).
Bug: 163797539
Test: atest class2nonsdklisttest

Change-Id: I1b72c243746dde9926a11d5a559b84e753e8fd4f
2020-08-13 17:33:14 +01:00
Ramy Medhat
2889166b6c Make the default exec strategy for javac/r8/d8 remote local fallback.
Test: presubmits
Change-Id: Ia67c2a1e13638db1fb9c93755ce72159767d46b4
2020-08-13 11:41:35 -04:00
Treehugger Robot
9d898694c8 Merge "Increase heap size for lint tool" am: fd5978a473 am: 4cb7543396
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1362698

Change-Id: I7580ea8d79d29d491bd6cff2845e35de48706144
2020-08-12 22:34:21 +00:00
Treehugger Robot
fc7baeb866 Merge "Stop using prebuilt NDK CRT objects." am: 50a58067e6 am: 52b4132004
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1363344

Change-Id: I0aaa0a1664f696c712bdf260663bf4b4648aea9c
2020-08-12 22:33:47 +00:00
Treehugger Robot
fd5978a473 Merge "Increase heap size for lint tool" 2020-08-12 22:07:18 +00:00
Treehugger Robot
50a58067e6 Merge "Stop using prebuilt NDK CRT objects." 2020-08-12 22:01:27 +00:00
Andrei-Valentin Onea
3ee7167f39 Merge "Rename hiddenapi csv artifact" am: d89374c5a7 am: ed7377cc19
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1394869

Change-Id: I4066161c643f710384fd7e3f606e9943242c21cf
2020-08-12 17:44:48 +00:00
Andrei-Valentin Onea
d89374c5a7 Merge "Rename hiddenapi csv artifact" 2020-08-12 17:08:10 +00:00
Dan Albert
92fe740677 Stop using prebuilt NDK CRT objects.
We don't need the prebuilt versions. The NDK CRT objects are (now)
built from the platform sources and the only difference is that the
NDK CRT objects also include an ELF note that identifies the NDK
version, which isn't helpful for anything built by the platform.

Add a `crt` property to cc_object that allows CRT objects to identify
themselves. CRT objects, unlike other modules, will have a variant
built per-API level they support, rather than just an SDK variant and
a platform variant. This is needed because new CRT objects will rely
on APIs not available in old libcs and old CRT objects will not
support all the features of a modern one.

Test: treehugger
Bug: http://b/159925977
Change-Id: I6595485fa1bfe0ad4945193d344b863f64eec654
2020-08-11 15:06:55 -07:00
Dan Willemsen
9f43597ff7 Remove obsolete PDK build functionality
This hasn't worked for a couple years, and continues to bitrot. Just
remove it.

Adds a bpfix rule so that we can eventually remove the
product_variables.pdk definition, which is now always a no-op.

Test: treehugger
Change-Id: I830b54d419b59f6db1d4617b45e61a78234f57a7
Merged-In: I830b54d419b59f6db1d4617b45e61a78234f57a7
2020-08-11 01:11:44 +00:00
Dan Willemsen
ba3876a91a Remove obsolete PDK build functionality
This hasn't worked for a couple years, and continues to bitrot. Just
remove it.

Adds a bpfix rule so that we can eventually remove the
product_variables.pdk definition, which is now always a no-op.

Test: treehugger
Change-Id: I830b54d419b59f6db1d4617b45e61a78234f57a7
2020-08-10 18:10:38 -07:00
Andrei Onea
47841973b2 Rename hiddenapi csv artifact
Use a more inclusive terminology (go/hiddenapi-list-renaming).

Bug: 162844296
Test: m
Change-Id: I9feea8f9d8e88977d949dfe4dcbd7e72bf77a451
2020-08-10 17:23:52 +01:00
Jingwen Chen
f00439326e Merge "Fix droiddoc disting when WITHOUT_CHECK_API is true." am: fc16b6684e am: 46b6b40c7a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1371680

Change-Id: I1d2aaebaaf4e6c153d287e5ccc77cf9d766a42eb
2020-08-10 06:00:00 +00:00
Jingwen Chen
fc16b6684e Merge "Fix droiddoc disting when WITHOUT_CHECK_API is true." 2020-08-10 05:22:24 +00:00
Jeongik Cha
ec87b5c85a Merge "Introduce AlwaysUsePrebuiltSdks" am: 6df337255c am: 497158434d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1356666

Change-Id: I92deaf13c3c7c7ae684bd11d5bd5d575d264bfb1
2020-08-10 01:25:06 +00:00
Jeongik Cha
6df337255c Merge "Introduce AlwaysUsePrebuiltSdks" 2020-08-10 00:51:56 +00:00
Treehugger Robot
b04255fc23 Merge "Merge libs/ directory of imported aars into classes.jar" am: 7189f5d1e2 am: 9a203fcd90
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1392878

Change-Id: I235cf9ed8a4926179b5b743570b08189609c6440
2020-08-08 01:20:59 +00:00