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
Offending change - I7b64de4b06e9bba3fba3712b25dd9f9d112e1625
This is in addition to Idebfdf1ed7d8e10ba867c8eaac01410d754c7131
Test: sh_binary_test.go
Bug: 156980228
Bug: 164465992
Change-Id: I8d01d0e82efe764cc6901bb3e2c2767c8b25d81f
In preparation for reusing the same variation for multiple apexes,
rename ApexName to ApexVariationName.
Bug: 164216768
Test: all soong tests
Change-Id: I88f2c5b192ffa27acd38e01952d0cefd413222a0
Only print the list of variants of the matching module when
ctx.ModuleForTesting finds the module but not the variant.
Test: all soong tests
Change-Id: I51ffdde4645db39ec1d37ec018e0dea11d74280e
Use a more inclusive name (go/hiddenapi-list-renaming).
Bug: 163797539
Test: atest class2nonsdklisttest
Change-Id: I1b72c243746dde9926a11d5a559b84e753e8fd4f
Move the linting properties to an enum with 4 possible options:
"default", "android", "vendor" or "none". The previous logic for
default, based on the module's location, is kept. It is now possible to
force the upgrade to a certain lint level for some modules (e.g.
external/[...]/android). Update the unit tests and documentation.
Bug: 163400111
Test: m
Change-Id: I8e464b04401158ed2d3c518a9b72f145a9835c99
This is an initial CL that collects the environment variables
USE_GOMA and USE_RBE. This is a needed metric to determine how
many users are currently using GOMA so we can help them migrate
to RBE.
Bug: b/163598127
Test: m nothing and checked soong_metrics
Change-Id: I39536eabad01aafbb3bd7182515d72230b36f658
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
The modules sources have been moved, update the sdk variant whitelist.
Bug: 156286599
Test: m
Exempt-From-Owner-Approval: cherry-pick from internal
Change-Id: Idbd02b17b1c741f1dc20a3742ff57e8469a846c0
Merged-In: Idbd02b17b1c741f1dc20a3742ff57e8469a846c0
Remove ipmemorystore-aidl-interfaces-java in allowlist for
com.android.tethering
Bug: 146436251
Test: m nothing
Change-Id: I8b7f97d59c2fd191f467ad50a8fd66d9a5d37704
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