Uses new capability added in previous change to separate the testing of
the versioned and unversioned snapshots in sdk/cc_sdk_test.go. Any test
that generated an _snapshot module that simply listed the modules and
did not check a new type only tests the unversioned output to reduce
the duplication and cost of changing the tests.
Bug: 180479010
Test: m nothing
Change-Id: If11f82b3dd8ec79110b3a2f5adf193b6464000ab
Previously, the only way to test the Android.bp file generated by the
sdk module was to test both the unversioned and versioned parts
together. This change allows them to be tested separately.
Bug: 180479010
Test: m nothing
Change-Id: I3d695bcfbff030a6da393283ab30ec0979fb2826
Previously, a cc library that included .aidl, .proto and/or .sysprop
files and exported headers generated from at least one of those types
would actually export generated headers from all of them.
While headers generated from .sysprop files are always exported those
generated from .aidl or .proto should only be exported when explicitly
requested.
This change treats them separately as expected. It has the potential
to break the build as it could reduce the set of headers exported and
so a dependent module that needed those would break. The fix in that
case is to simply add one (or both) of the following to the module
that previously exported those headers:
aidl: {
export_aidl_headers: true,
}
proto: {
export_proto_headers: true,
}
Bug: 180712399
Test: m droid
Change-Id: I488182e27dd423d261443612f98d5c112dd3ef8f
The new mode is enabled with environment variable
RELAX_USES_LIBRARY_CHECK. If the variable is set to true, then a
verify_uses_libraries check failure does not fail the build, instead it
sets a special compiler filter "extract" for dexpreopt, which means that
the DEX file will be extracted, but it won't be compiled to native code.
Class loader context will be set to empty in this case (not &, as it is
going to be deprecated soon).
If the variable RELAX_USES_LIBRARY_CHECK is unset or set to something
other than "true", then the old behaviour of the verify_uses_libraries
check is preserved.
The intended use case for this flag is to have a smoother migration path
for the Java modules that need to add <uses-library> information in
the build files. The flag allows to quickly silence build errors. This
flag should be used with caution and only as a temporary measure, as it
masks real errors and affects performance.
verify_uses_libraries check is reworked so that it writes the error
message to a status file (which is used instead of the former timestamp
file). Currently the stored error message is not used, but it may be
used later to produce a warning. Dexpreopt command checks if the status
file exists and is nonempty; if that is the case, then compiler filter
is set to "extract".
Bug: 132357300
Test: Manually add some mismatch between the libraries in the Android.bp
and Android.mk files for dexpreopted apps, build with
RELAX_USES_LIBRARY_CHECK=true and obsserve that the build doesn't
fail and they are compiled with compiler-filter "extract".
Unset RELAX_USES_LIBRARY_CHECK and observe that the build fails.
Change-Id: Ibb5d993a25b1df1d2e70b7d5aafc6997f9d64e67
These are not currently tracked before because the shims are just
filegroups. aosp/1598155 is turning them into libraries so each
shim can build with the appropriate SDK version.
Test: m
Change-Id: I9df3dd98d46f49943211cb0893493d628ddd157c
Merged-In: I9df3dd98d46f49943211cb0893493d628ddd157c
Some crates (i.e. rustversion) probe at build time the version of Rust
to enable features or tests. Pass the version via an environment
variable so it can be used by a patched crate.
Bug: 178357400
Test: m librustversion
Change-Id: If57a6339b71d2188c56e7dc6709075e4537403b4
By replacing MinApiLevelModuleController with
ShippingApiLevelModuleController, we don't need to define
api-level-prop option. The property name must not be a parameter but
be defined in the module controller.
test_min_sdk_version is removed as it is not used.
Bug: 178990561
Test: atest vts_core_liblp_test
Change-Id: Ib4660b91c7adb2ec8b970197dc6f65b8e6952a66
Add a ctx parameter to AndroidMkExtraEntriesFunc to allow them to
access providers.
Test: m checkbuild
Change-Id: Id6becc1e425c3c3d8519248f8c0ce80777fac7cc
Merged-In: Id6becc1e425c3c3d8519248f8c0ce80777fac7cc
Improves the test coverage for exporting of generated headers. These
tests highlight the bug described in b/180712399.
Follow up changes will refactor and fix bugs in this code. Adding the
tests separately help ensure that those changes do not inadvertantly
change the behavior.
Test: m nothing
Bug: 180712399
Change-Id: I0225b0cf53259071edb99a94be5014ed0e019bde
Sample output:
[bp2build] cc_library_headers: 5 targets
[bp2build] cc_object: 5 targets
[bp2build] filegroup: 4 targets
[bp2build] genrule: 4 targets
[bp2build] sh_binary: 1 targets
[bp2build] Generated 19 total BUILD targets from 39270 Android.bp modules.
This CL adds an additional CodegenMetrics return value to
GenerateBazelTargets calls, which are called from bp2build, queryview,
and their tests. For this UI, we only want to use it for bp2build, and
not queryview or tests, since it's not useful for the former, and can
pollute the CLI for the latter.
Test: build/bazel/scripts/milestone-2/demo.sh
Change-Id: Ic84307a1ed1a25e360c9b23459e5449d932bc2e7
DO NOT MERGE / RESTRICT AUTOMERGE and its cousin DO NOT MERGE
ANYWHERE are almost always misused. Make it an error to upload
commits with those merge strategies.
Bug: 156896646
Test: repo upload -n (with DNM and RM commits)
Change-Id: Iae3540fa35dbd7b87a14b53a20be0cd23a206f3a
This package can be used by other binary generator to gather the section
sizes at build time. It uses bloaty_merger to export all the measured
data into a single proto file.
Bug: 172339742
Test: m out/soong/binary_sizes.pb
Change-Id: I0ca87cdb2fb8b77226e79d9dcd762abe64aeea51