Make now exports (partial) lists of what should be installed. Those
lists are incomplete, but if something is removed from the list, we can
remove it from the filesystem so that incremental builds work better.
Test: built-in tests (m blueprint_tools)
Test: remove a module from PRODUCT_PACKAGES, see the print and file removed
Test: change the name of a cts test, see the old one removed from cts
Change-Id: I6bc14c6a5af63383ea265e97ed8b875fa51af0ed
Ninja does not track changes in environment variables, so we get
potentially incorrect builds when environment variables change during
incremental builds if some action was using one of them.
Add a variable to limit exposure of these variables to ninja, and thus,
all actions run by ninja. Kati and Soong can still read environment
variables, they explicitly track which ones they read so that we can
re-run them appropriately.
This list is just the beginning, there's no good way to detect which
environment variables are currently being used and to pass them through.
So this initial change won't have a behavioral change, and we'll flip
the switch and see what fails or who complains, flipping it off and on
and adding to the list until we can make this always happen.
Also adds a board-specific `BUILD_BROKEN_NINJA_USES_ENV_VARS := ...`
list so that we can temporarily allow board-specific variables until
they're fixed.
Test: check out/soong.log
Test: ALLOW_NINJA_ENV=false m nothing; check out/soong.log
Test: set BUILD_BROKEN_NINJA_USES_ENV_VARS := OLDPWD
ALLOW_NINJA_ENV=false m nothing; check out/soong.log
Change-Id: I08e4834ce12100a577ef7d6a9a21b9e9d345cb93
It will be used to build a shim apex with zeroed hashtree for use in CTS
tests.
Test: builds
Bug: 145670581
Change-Id: I6f84850fefb3b58a1c2e8328242920d64a61e733
Bug: 144477678
Test: verified that apex_build_info.pb is populated and included in the
final apex.
Change-Id: Iecbc2a68a82595eee32aaa26d11a7253daf89f69
If api_packages is not set then will try and generate stubs from all
the source packages.
Bug: 145998881
Test: m checkbuild
Change-Id: Ic9d7f82bb34c4b960a2f17614d7f64ddd13ad8b0
If the library does not provide system and test APIs then do not
generate/require corresponding .txt files.
Bug: 145998881
Test: m checkbuild
Change-Id: I21cfdb0b63fd575e8c8c63ea2b436e0c4aa8f3fc
The createDocs(...) method was obviously named because it created a
droiddocs target that generated the stubs source but it now creates a
droidstubs target so the name was misleading.
Bug: 145998881
Test: m checkbuild
Change-Id: I7419b0a01ee87ecb2b396e4817e5e88a88a8b7b6
Adds java_test_import module type for use by the sdk snapshot and
adds java_tests property to the sdk and sdk_snapshot module type.
This is needed for the conscrypt test sdk.
Bug: 143678475
Test: m nothing
Change-Id: Ied4c56c978dac2f92a9b3bc34b3235d7eeba2fd3
By default SdkMemberTypes are only supported on module_exports module
type. Support for sdk module type has to be explicitly specified.
The java_header_libs, native_shared_libs and stubs_sources are
supported on sdk. The latter is required to provide the stubs source
for an API specified in java_header_libs as they should be kept in
sync.
Bug: 146341462
Test: m nothing
Change-Id: I19b9e60792780a797458d4a9e489506602b13144
Some devices require VNDK using core library list, but this is dependent
to system image rather than VNDK version. This change removes VNDK using
core variant library list file from VNDK APEX, and also remove VNDK
version from its filename.
Bug: 142599349
Test: m -j passed && aosp_cf_x86_go_phone booted
Change-Id: Ibc53b8dfc9d38e14bbaa878154034d25a6d34089
Define a field CCSrcs and other cc related flags in a type ccIdeInfo
struct and write them into out/soong/module_bp_cc_deps.json. AIDEGen
can use these data to generate CMakeLists.txt by Python for multiple
native projects in CLion IDE.
Bug: 141512319
Test: 1. export SOONG_COLLECT_JAVA_DEPS=false SOONG_COLLECT_CC_DEPS=true;m nothing
check
1). File out/soong/module_bp_cc_deps.json is generated.
2). In "JniInvocation_test" module: "path", "srcs",
"global_common_flags", "local_common_flags",
"global_c_flags", "local_c_flags", "global_c_conly_flags",
"local_c_conly_flags", "global_cpp_flags",
"local_cpp_flags" and "system_include_flags"
have been created.
Change-Id: I9292cc6373157ba68f013998a7364f84a70d5593
Apparently we have some instances of Soong taking 16GB of RAM. While
that's a problem to solve on it's own, make multiproduct_kati's
auto-parallelism detection smarter by taking into account the total RAM
on the machine instead of just the number of CPUs.
Bug: 146925549
Test: check soong.log for autodetected parallelism values
Change-Id: Ice34c2cf73ea4f8f235521cbefc8654a79a04eef
Colin originally wrote this for the highmem pool:
https://android-review.googlesource.com/c/platform/build/soong/+/1168271
But while that's a larger change, this is useful to just be in the logs,
and for use in multiproduct_kati to better limit the number of
concurrent jobs.
Test: check soong.log on linux and mac
Change-Id: I0518d303a220d775f8d78dba9f660b2954e68e3e
Create an APEX variation of a module only when it is either directly
included in an APEX or the dependency to the module demands that the
module should be included. For example, a non-static dependency to a
java library no longer creates an APEX variant of the library.
Bug: 146907857
Test: m (apex_test amended)
Test: cat out/soong/build.ninja | grep "Module:" | wc -l
reduced from 47132 to 45881
Change-Id: Icd79fb4b60668d852b9f018343b934b5e42a8eda
Permission XML file for java_sdk_library is generated by
java_sdk_library itself now.
And, build rule is switched to android.WriteFile since "echo -e" is
not supported from build server. (-e is printed to output)
Bug: 145474221
Test: m com.android.cronet and check its permissions xml file
also, m org.chromium.net.cronet.xml (created dynamically)
Change-Id: Iffb119151c49bc4fe6c4386fa267cca193f37dbc
Two APEXes (i18n, art) requires compat symlinks and these symlinks are
created via ld.config.txt module's POST_INSTALL_CMDS.
$ m installclean
$ m ld.config.txt
$ tree $OUT/system
.../system
├── bin
│ ├── dalvikvm -> /apex/com.android.art/bin/dalvikvm
│ └── dex2oat -> /apex/com.android.art/bin/dex2oat
├── etc
│ └── ld.config.txt
└── usr
└── icu -> /apex/com.android.i18n/etc/icu
By the way, ld.config.txt is going to removed since linkerconfig
generates it on device.
So, we're moving symlink creation from ld.config.txt(rootdir/Android.mk)
to APEXes' POST_INSTALL_CMDS.
$ m installclean
$ m com.android.i18n
$ tree $OUT/system
.../system
├── apex
│ └── com.android.i18n.apex
└── usr
└── icu -> /apex/com.android.i18n/etc/icu
$ m installclean
$ m com.android.art
$ tree $OUT/system
.../system
├── apex
│ └── com.android.art.debug.apex
├── bin
│ ├── dalvikvm -> /apex/com.android.art/bin/dalvikvm
│ └── dex2oat -> /apex/com.android.art/bin/dex2oat
Bug: 143192278
Test: m && boot (since these two apexes are bootstrap apexes)
Change-Id: Ib29ea9f9ac40e74f78cd530e7daef8c51292fd24
java_import doesn't support dex jar which is necessary to be packaged in
an APEX. Supporting this would require non-trivial work. By the way
java_import is not used and there is a workaround.(defining java_library
and static-linking with it)
We drop the support for `java_import` in APEX.
Bug: 139175488
Test: m (soong tests amended)
Change-Id: I924386571079090c701276d87f665ce7fbb6f074
The modules were moved from developement/build to frameworks/base.
In addition, they no longer uses 'sdk_version:"none"'. Reflect that
change here.
Bug: N/A
Test: m
Exempt-From-Owner-Approval: cherry-pick from internal
Merged-In: I6f69f7cb64a6ed3c2032a116500436eabe562dca
(cherry picked from commit 12cc126760)
Change-Id: I6f69f7cb64a6ed3c2032a116500436eabe562dca
The cc library and cc binary (and other cc module types) are all
instances of cc.Module. So, to differentiate between them and make
sure that only appropriate library instances can be added to
native_shared/static_libs this adds a special sdkMemberTypes field to
Module which if set specifies the SdkMemberTypes the module supports.
If it is not set then the module type cannot be used in the sdk at all.
Corrects an issue with one of the tests where a prebuilt cc
library was added to the sdk instead of a source cc library.
Adds a new test to ensure that cc_library_(shared|static)_host module
types work with the sdk as well and another test to ensure that
cc_library can be used as either.
Bug: 142918168
Test: m checkbuild
Change-Id: I359cdbdd15328ca571f276d2b6ce9a229ebb2c86