We don't want rules to load the product variables directly, because
then they won't be able to transition on them.
Break constant information that is safe to load outside of the
product vars file, so that we can make the product vars file have
more restricted visibility later.
Bug: 269577299
Test: m nothing
Change-Id: I848bff33e4f5798f51296ea3a2600615cab36985
Updatable apexes should set a min_sdk_version that is not current. This
enforcement does not exist today, but will soon be added to the build
system. In preparation for that, cleanup the min_sdk_version property
used in this unit test.
Test: go test ./apex
Bug: 221087384
Change-Id: Idabc4c6f20e134b38ed0ae3ce68f6b7d54d7a13c
.. as a validation for apex.
apex_sepolicy_tests checks the contents of the apex against
precompilec_sepolicy. This is to avoid common mistakes in file_contexts.
For example, etc/vintf directory should be read-able by servicemanager.
Bug: 267269895
Test: m com.google.cf.wifi (with wrong file_contexts entry)
Change-Id: Ic363345df43e5b2108b07de787f5f6817bbe6af4
Modify the visibility of defaultJavaLibraryName() to export it so that
it can be accessed from another package. This is essential for use case
when identical JavaApiLibraryName() has to be returned regardless of
config.
Test: m
Change-Id: Iefa1b3eb18a0d2717284608c825f488e7ae73df0
There was an incrementality bug in the symlink forest generation that
was recently fixed. However, if the appropriate files don't get touched,
the issue will remain. Add a mechanism to clean old symlink forests
so that when we fix incrementality bugs we can ensure they don't remain
in any old out directories.
Bug: 276349152
Test: Presubmits
Change-Id: I36664dfb0ca7227e3e1f89de859ebccb808c5f15
It was possible for the merged content to end up back in the bp2build
generated file because there was a symlink from the symlink forest to
the bp2build generated file.
Remove the symlink if it exists.
Bug: 276349152
Test: m bp2build, add a handcrafted file in the same folder as a Android.bp file, m bp2build again, check that the symlink forest version is not a symlink
Change-Id: Id64aa3addebcf0c6b1728389f21ae246796aaf8d
This enables turnning off -fprofile-sample-accurate on a per project
basis.
Bug: 274725934
Bug: 273415627
Test: presubmit
Change-Id: I15060950f7b55e51069cb00b66512c7e94981f1b
The full api surface java_api_library modules are currently defined as
java_library modules instead of java_api_library modules. This change
corrects this and modifies the DepsInfo of java_api_library so that it
can be compatible in tests.
Test: go ./java
Change-Id: I540b5a930f506ce5f7663ab6e07c6df49af15cf9
APIs to compile lambda are part of art's toolchain api surface.
Generating stubs from .txt files allows us to prune the remaining sdk
dependencies on libcore/ that are not api files
Test: m core-lambda-stubs.from-text
(On top of change containing core.current.stubs.from-text
and turning enabled: true)
Change-Id: I0ab8459b9317cb055a434eb635ba06d38da5b92e
This reverts commit da03b08062.
Reason for revert: This was previously reverted in aosp/2510617 due to b/275666961, which spawned b/276416537 and b/276416485 that Cole and I are working on now. Given that the root causes are still being actively resolved, I believe this will cause the test (b/275666961) to fail again.
Change-Id: I69e756f823f920610a832a1fc88b415074c0f488
Otherwise when other modules use the apex as data (for example, in
tests) they get the full path from the root of the workspace to the
apex.
Fixes: 276416485
Test: atest timezone_data_e2e_tests:com.android.tests.apex.TimezoneDataHostTest#testStageActivateUninstallApexPackage -- --abi x86_64 then tree out/host/linux-x86/testcases/timezone_data_e2e_tests
Change-Id: Id740856794770df2edc55dfff5f6f938fc31d0c5
Users can pass the jar-file creating module via dep_api_srcs property in
java_api_library to create the jar file not by compiling the stubs
generated from metalava but by extracting and zipping the class files
from the jar file of the input module.
Test: m android-non-updatable.stubs.from-text
Bug: 273381329
Change-Id: Id1b75179111cc7ff45faaff58388db1347bb18e5
Some Rust crates with no src_deps have generated files checked in in an
"out" subdirectory and included via a reference to $OUT_DIR, such as
external/rust/crates/userfaultfd-sys.
Astonishingly, some people must be leaving $OUT_DIR set to the default
value of "out", because with $OUT_DIR set to this value, building these
crates would presumably succeed. For everyone else, the build fails
when building one of these crates because it will attempt to load from
the wrong directory. Presumably these crates should be using src_deps
instead (and once that's fixed, we should probably *unset* $OUT_DIR in
rustc invocations to prevent the same thing from happening again), but
for now, fix the build with non-default OUT_DIR by explicitly setting
OUT_DIR to "out" if there are no src_deps.
Change-Id: I09f99424fc01a1e42e910622c77ab8f7312819bd
Ignore-AOSP-First: The parent CL is internal
Bug: 267229065
Test: go test
Change-Id: Ia14679285b92f3f14ff269392a61f978c71311b2
Merged-In: Ia14679285b92f3f14ff269392a61f978c71311b2
Introducing fdo_profile module type to reimplement the afdo support in cc moduels. This change allows the feature to be compatible with Bazel migration.
How it works:
PreDepsMutators:
* BeginMutator: If non-static cc modules sets afdo prop, search and add corresponding fdo_profile module as a dep with fdoProfileTag
* fdoProfileMutator:
* If in fdo_profile module, set FdoProfileProvider with full path to profile
* If in cc module, read FdoProfileProvider from dep with fdoProfileTag and set FdoProfileInfo.Path to FdoProfilePath field
PostDepsMutators:
* afdoDepsMutator: If a module has FdoProfilePath set, walk to its static deps and set itself to the deps' AfdoRdeps
* afdoMutator: If a static dep has AfdoRDeps set, create afdo variant.
Ignore-AOSP-First: Other CLs in the same topic are internal-only
Test: go test
Bug: b/267229065
Change-Id: I687d798a02d9743c92804fea36fb4ae3a7a0e5e3
Merged-In: I687d798a02d9743c92804fea36fb4ae3a7a0e5e3