Make LoadHookContext embed a new EarlyModuleContext instead of
BaseModuleContext to reduce its API surface in preparation for
moving it to run during parsing instead of mutators.
Test: m checkbuild
Change-Id: I1cd3ff3b636e7e24991a9184d7521903473e505a
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
prebuilts.
This runs Soong in skip-make mode, using normal in-make mode only to query
platform versions.
The same ${OUT_DIR} cannot be used for both skip-make and in-make builds,
because Soong generates a smaller build.ninja file in in-make builds where
many build targets are expected to be provided by the mk files. Thus this
script avoids using ${OUT_DIR} if it's an in-make build, defaulting instead
to out-aml/.
The script is based on build-ndk-prebuilts.sh, but uses a separate Soong
variable Aml_abis to enable the appropriate target architectures for
Mainline modules. Aml_abis is very similar to Ndk_abis, except "armeabi-v7a"
is used instead of "armeabi", which is necessary to match prebuilt
dependencies, e.g. for LLVM.
Test: build/soong/scripts/build-aml-prebuilts.sh libart libdexfile_external
(verify that libraries for arm, arm64, x86, x86_64 are built)
Test: build/soong/scripts/build-aml-prebuilts.sh \
out-aml/soong/.intermediates/external/conscrypt/conscrypt-module-sdk/android_common/conscrypt-module-sdk-current.zip
(verify that the zip file contains libconscrypt_jni.so's for all four arches)
Test: build/soong/scripts/build-aml-prebuilts.sh com.android.art.{release,debug,testing,host}
(verify that the build completes)
Test: Two identical build/soong/scripts/build-aml-prebuilts.sh runs after each other
(verify that the 2nd run completes both Soong and ninja steps quickly without any building)
Change-Id: I35712f9f8f0b1cbb77107314c5927c6720e6c3bf
When PRODUCT_PRODUCT_VNDK_VERSION is set to 'current', product
modules are enforced to use only VNDK libs from the system partition
as BOARD_VNDK_VERSION does to vendor partition.
Modules with 'vendor_available: true' create product variant as well
as core and vendor variants. The product variant as an image variant
is used for the modules in /product or /system/product.
It must not affect the current build behavior without
PRODUCT_PRODUCT_VNDK_VERSION set.
Bug: 134099726
Bug: 138966004
Bug: 144534640
Test: build without PRODUCT_PRODUCT_VNDK_VERSION set
Change-Id: I4d3585c110d84493e45bf76d550dc240bb26137f